java.lang.Object
org.activemq.io.impl.AbstractPacketReader
org.activemq.io.impl.AbstractPacketMarshaller
- All Implemented Interfaces:
- PacketReader, PacketWriter
- public abstract class AbstractPacketMarshaller
- extends AbstractPacketReader
- implements PacketWriter
- Version:
- $Revision: 1.1 $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
wireFormatVersion
protected int wireFormatVersion
AbstractPacketMarshaller
public AbstractPacketMarshaller()
writeUTF
protected void writeUTF(java.lang.String str,
java.io.DataOutput dataOut)
throws java.io.IOException
- simple helper method to ensure null strings are catered for
readDestination
protected org.activemq.message.ActiveMQDestination readDestination(java.io.DataInput dataIn)
throws java.io.IOException
- Reads a destination from the input stream
writeDestination
protected void writeDestination(org.activemq.message.ActiveMQDestination destination,
java.io.DataOutput dataOut)
throws java.io.IOException
- Writes the given destination to the stream
canWrite
public boolean canWrite(org.activemq.message.Packet packet)
- Specified by:
canWrite in interface PacketWriter
writeObject
protected void writeObject(java.lang.Object object,
java.io.DataOutput dataOut)
throws java.io.IOException
- Simple (but inefficent) utility method to write an object on to a stream
writePacketToByteArray
public byte[] writePacketToByteArray(org.activemq.message.Packet packet)
throws java.io.IOException
- Serializes a Packet int a byte array
- Specified by:
writePacketToByteArray in interface PacketWriter
writePacket
public void writePacket(org.activemq.message.Packet p,
java.io.DataOutput dataOut)
throws java.io.IOException
- Write a Packet instance to data output stream
- Specified by:
writePacket in interface PacketWriter
setWireFormatVersion
public void setWireFormatVersion(int version)
- Set the wire format version
- Specified by:
setWireFormatVersion in interface PacketWriter- Overrides:
setWireFormatVersion in class AbstractPacketReader
getWireFormatVersion
public int getWireFormatVersion()
- Specified by:
getWireFormatVersion in interface PacketWriter- Overrides:
getWireFormatVersion in class AbstractPacketReader