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 abstract class ActiveMQDestinationMarshaller extends BaseDataStreamMarshaller { 42 43 50 public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { 51 super.tightUnmarshal(wireFormat, o, dataIn, bs); 52 53 ActiveMQDestination info = (ActiveMQDestination)o; 54 info.setPhysicalName(tightUnmarshalString(dataIn, bs)); 55 56 } 57 58 59 62 public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { 63 64 ActiveMQDestination info = (ActiveMQDestination)o; 65 66 int rc = super.tightMarshal1(wireFormat, o, bs); 67 rc += tightMarshalString1(info.getPhysicalName(), bs); 68 69 return rc + 0; 70 } 71 72 79 public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { 80 super.tightMarshal2(wireFormat, o, dataOut, bs); 81 82 ActiveMQDestination info = (ActiveMQDestination)o; 83 tightMarshalString2(info.getPhysicalName(), dataOut, bs); 84 85 } 86 87 94 public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { 95 super.looseUnmarshal(wireFormat, o, dataIn); 96 97 ActiveMQDestination info = (ActiveMQDestination)o; 98 info.setPhysicalName(looseUnmarshalString(dataIn)); 99 100 } 101 102 103 106 public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { 107 108 ActiveMQDestination info = (ActiveMQDestination)o; 109 110 super.looseMarshal(wireFormat, o, dataOut); 111 looseMarshalString(info.getPhysicalName(), dataOut); 112 113 } 114 } 115 | Popular Tags |