1 18 19 package org.apache.activemq.openwire.v2; 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 ConnectionErrorMarshaller extends BaseCommandMarshaller { 42 43 47 public byte getDataStructureType() { 48 return ConnectionError.DATA_STRUCTURE_TYPE; 49 } 50 51 54 public DataStructure createObject() { 55 return new ConnectionError(); 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 ConnectionError info = (ConnectionError)o; 69 info.setException((java.lang.Throwable ) tightUnmarsalThrowable(wireFormat, dataIn, bs)); 70 info.setConnectionId((org.apache.activemq.command.ConnectionId) tightUnmarsalNestedObject(wireFormat, dataIn, bs)); 71 72 } 73 74 75 78 public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { 79 80 ConnectionError info = (ConnectionError)o; 81 82 int rc = super.tightMarshal1(wireFormat, o, bs); 83 rc += tightMarshalThrowable1(wireFormat, info.getException(), bs); 84 rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs); 85 86 return rc + 0; 87 } 88 89 96 public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { 97 super.tightMarshal2(wireFormat, o, dataOut, bs); 98 99 ConnectionError info = (ConnectionError)o; 100 tightMarshalThrowable2(wireFormat, info.getException(), dataOut, bs); 101 tightMarshalNestedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs); 102 103 } 104 105 112 public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { 113 super.looseUnmarshal(wireFormat, o, dataIn); 114 115 ConnectionError info = (ConnectionError)o; 116 info.setException((java.lang.Throwable ) looseUnmarsalThrowable(wireFormat, dataIn)); 117 info.setConnectionId((org.apache.activemq.command.ConnectionId) looseUnmarsalNestedObject(wireFormat, dataIn)); 118 119 } 120 121 122 125 public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { 126 127 ConnectionError info = (ConnectionError)o; 128 129 super.looseMarshal(wireFormat, o, dataOut); 130 looseMarshalThrowable(wireFormat, info.getException(), dataOut); 131 looseMarshalNestedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut); 132 133 } 134 } 135 | Popular Tags |