1 18 19 package org.apache.activemq.openwire.v1; 20 21 import java.io.DataInput ; 22 import java.io.DataOutput ; 23 import java.io.IOException ; 24 25 import org.apache.activemq.openwire.*; 26 import org.apache.activemq.command.*; 27 28 29 30 41 public class ExceptionResponseMarshaller extends ResponseMarshaller { 42 43 47 public byte getDataStructureType() { 48 return ExceptionResponse.DATA_STRUCTURE_TYPE; 49 } 50 51 54 public DataStructure createObject() { 55 return new ExceptionResponse(); 56 } 57 58 65 public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { 66 super.tightUnmarshal(wireFormat, o, dataIn, bs); 67 68 ExceptionResponse info = (ExceptionResponse)o; 69 info.setException((java.lang.Throwable ) tightUnmarsalThrowable(wireFormat, dataIn, bs)); 70 71 } 72 73 74 77 public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { 78 79 ExceptionResponse info = (ExceptionResponse)o; 80 81 int rc = super.tightMarshal1(wireFormat, o, bs); 82 rc += tightMarshalThrowable1(wireFormat, info.getException(), bs); 83 84 return rc + 0; 85 } 86 87 94 public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { 95 super.tightMarshal2(wireFormat, o, dataOut, bs); 96 97 ExceptionResponse info = (ExceptionResponse)o; 98 tightMarshalThrowable2(wireFormat, info.getException(), dataOut, bs); 99 100 } 101 102 109 public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { 110 super.looseUnmarshal(wireFormat, o, dataIn); 111 112 ExceptionResponse info = (ExceptionResponse)o; 113 info.setException((java.lang.Throwable ) looseUnmarsalThrowable(wireFormat, dataIn)); 114 115 } 116 117 118 121 public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { 122 123 ExceptionResponse info = (ExceptionResponse)o; 124 125 super.looseMarshal(wireFormat, o, dataOut); 126 looseMarshalThrowable(wireFormat, info.getException(), dataOut); 127 128 } 129 } 130 | Popular Tags |