|
|||||||||||
| 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.
| Constructor Summary | |
DefaultWireFormat()
Default Constructor |
|
| Method Summary | |
WireFormat |
copy()
Creates a new copy of this wire format so it can be used in another thread/context |
Packet |
readPacket(java.io.DataInput in)
Reads a packet from the given input stream |
protected Packet |
readPacket(java.io.DataInput dataIn,
PacketReader reader)
|
Packet |
readPacket(int firstByte,
java.io.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,
java.io.DataOutput dataOut)
Write a Packet to a DataOutput |
protected void |
writePacket(Packet packet,
java.io.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 |
| Constructor Detail |
public DefaultWireFormat()
| Method Detail |
public WireFormat copy()
WireFormat
copy in class WireFormat
public Packet readPacket(java.io.DataInput in)
throws java.io.IOException
WireFormat
readPacket in class WireFormatin -
java.io.IOException
public Packet readPacket(int firstByte,
java.io.DataInput dataIn)
throws java.io.IOException
WireFormat
readPacket in class WireFormatfirstByte - the first byte of the packetdataIn - the rest of the packet
java.io.IOException
public void writePacket(Packet packet,
java.io.DataOutput dataOut)
throws java.io.IOException
writePacket in class WireFormatpacket - dataOut -
java.io.IOException
public byte[] toBytes(Packet packet)
throws java.io.IOException
toBytes in class WireFormatpacket -
java.io.IOException
protected final void writePacket(Packet packet,
java.io.DataOutput dataOut,
PacketWriter writer)
throws java.io.IOException
java.io.IOException
protected final Packet readPacket(java.io.DataInput dataIn,
PacketReader reader)
throws java.io.IOException
java.io.IOException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||