|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.codehaus.activemq.message.WireFormat
org.codehaus.activemq.message.DefaultWireFormat
Default implementation used for Java-Java protocols. When talking to non-Java nodes we may use a different wire format.
| Field Summary | |
static int |
WIRE_FORMAT_VERSION
Current wire format version for this implementation |
| Constructor Summary | |
DefaultWireFormat()
Default Constructor |
|
| Method Summary | |
boolean |
canProcessWireFormatVersion(int version)
Can this wireformat process packets of this version |
WireFormat |
copy()
Creates a new copy of this wire format so it can be used in another thread/context |
int |
getCurrentWireFormatVersion()
|
Packet |
readPacket(DataInput in)
Reads a packet from the given input stream |
protected Packet |
readPacket(DataInput dataIn,
PacketReader reader)
|
Packet |
readPacket(int firstByte,
DataInput dataIn)
A helper method for working with sockets where the first byte is read first, then the rest of the message is read. |
byte[] |
toBytes(Packet packet)
A helper method which converts a packet into a byte array Overrides the WireFormat to make use of the internal BytesOutputStream |
void |
writePacket(Packet packet,
DataOutput dataOut)
Write a Packet to a DataOutput |
protected void |
writePacket(Packet packet,
DataOutput dataOut,
PacketWriter writer)
|
| Methods inherited from class org.codehaus.activemq.message.WireFormat |
fromBytes, fromBytes, readPacket, writePacket |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int WIRE_FORMAT_VERSION
| Constructor Detail |
public DefaultWireFormat()
| Method Detail |
public WireFormat copy()
WireFormat
copy in class WireFormat
public Packet readPacket(DataInput in)
throws IOException
WireFormat
readPacket in class WireFormatin -
IOException
public Packet readPacket(int firstByte,
DataInput dataIn)
throws IOException
WireFormat
readPacket in class WireFormatfirstByte - dataIn -
IOException
public void writePacket(Packet packet,
DataOutput dataOut)
throws IOException
writePacket in class WireFormatpacket - dataOut -
IOException
public byte[] toBytes(Packet packet)
throws IOException
toBytes in class WireFormatpacket -
IOExceptionpublic boolean canProcessWireFormatVersion(int version)
canProcessWireFormatVersion in class WireFormatversion - the version number to test
public int getCurrentWireFormatVersion()
getCurrentWireFormatVersion in class WireFormat
protected final void writePacket(Packet packet,
DataOutput dataOut,
PacketWriter writer)
throws IOException
IOException
protected final Packet readPacket(DataInput dataIn,
PacketReader reader)
throws IOException
IOException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||