|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.activemq.io.AbstractWireFormat
org.activemq.io.impl.AbstractDefaultWireFormat
Default implementation used for Java-Java protocols. When talking to non-Java nodes we may use a different wire format.
Fields inherited from class org.activemq.io.AbstractWireFormat |
cachingEnabled, transportDataIn, transportDataOut |
Fields inherited from interface org.activemq.io.WireFormat |
DEFAULT_MAXIMUM_MESSAGE_SIZE |
Constructor Summary | |
AbstractDefaultWireFormat()
Default Constructor |
Method Summary | |
boolean |
canProcessWireFormatVersion(int version)
Can this wireformat process packets of this version |
abstract WireFormat |
copy()
Creates a new copy of this wire format so it can be used in another thread/context |
int |
getCurrentWireFormatVersion()
|
abstract Object |
getValueFromReadCache(short key)
|
protected PacketWriter |
getWriter(Packet packet)
|
protected abstract void |
handleCachedValue(CachedValue cv)
|
void |
initiateClientSideProtocol(DataOutputStream dataOut,
DataInputStream dataIn)
Some wire formats require a handshake at start-up |
void |
initiateServerSideProtocol(DataOutputStream dataOut,
DataInputStream dataIn)
Some wire formats require a handshake at start-up |
protected abstract 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. |
void |
setCurrentWireFormatVersion(int version)
set the current version |
abstract byte[] |
toBytes(Packet packet)
A helper method which converts a packet into a byte array |
abstract Packet |
writePacket(Packet packet,
DataOutput dataOut)
Writes the packet to the given output stream |
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
protected transient PacketReader messageReader
protected transient PacketReader textMessageReader
protected transient PacketReader objectMessageReader
protected transient PacketReader bytesMessageReader
protected transient PacketReader streamMessageReader
protected transient PacketReader mapMessageReader
protected transient PacketReader messageAckReader
protected transient PacketReader receiptReader
protected transient PacketReader consumerInfoReader
protected transient PacketReader producerInfoReader
protected transient PacketReader transactionInfoReader
protected transient PacketReader xaTransactionInfoReader
protected transient PacketReader brokerInfoReader
protected transient PacketReader connectionInfoReader
protected transient PacketReader sessionInfoReader
protected transient PacketReader durableUnsubscribeReader
protected transient PacketReader reponseReceiptReader
protected transient PacketReader intReponseReceiptReader
protected transient PacketReader capacityInfoReader
protected transient PacketReader capacityInfoRequestReader
protected transient PacketReader wireFormatInfoReader
protected transient PacketReader keepAliveReader
protected transient PacketReader brokerAdminCommandReader
protected transient PacketReader cachedValueReader
protected transient PacketReader cleanupConnectionAndSessionInfoReader
protected transient PacketWriter messageWriter
protected transient PacketWriter textMessageWriter
protected transient PacketWriter objectMessageWriter
protected transient PacketWriter bytesMessageWriter
protected transient PacketWriter streamMessageWriter
protected transient PacketWriter mapMessageWriter
protected transient PacketWriter messageAckWriter
protected transient PacketWriter receiptWriter
protected transient PacketWriter consumerInfoWriter
protected transient PacketWriter producerInfoWriter
protected transient PacketWriter transactionInfoWriter
protected transient PacketWriter xaTransactionInfoWriter
protected transient PacketWriter brokerInfoWriter
protected transient PacketWriter connectionInfoWriter
protected transient PacketWriter sessionInfoWriter
protected transient PacketWriter durableUnsubscribeWriter
protected transient PacketWriter reponseReceiptWriter
protected transient PacketWriter intReponseReceiptWriter
protected transient PacketWriter capacityInfoWriter
protected transient PacketWriter capacityInfoRequestWriter
protected transient PacketWriter wireFormatInfoWriter
protected transient PacketWriter keepAliveWriter
protected transient PacketWriter brokerAdminCommandWriter
protected transient PacketWriter cachedValueWriter
protected transient PacketWriter cleanupConnectionAndSessionInfoWriter
protected transient int currentWireFormatVersion
Constructor Detail |
public AbstractDefaultWireFormat()
Method Detail |
public abstract byte[] toBytes(Packet packet) throws IOException
AbstractWireFormat
toBytes
in interface WireFormat
toBytes
in class AbstractWireFormat
packet
-
IOException
public abstract Packet writePacket(Packet packet, DataOutput dataOut) throws IOException
WireFormat
writePacket
in interface WireFormat
packet
- dataOut
-
IOException
protected abstract Packet readPacket(DataInput dataIn, PacketReader reader) throws IOException
IOException
protected abstract void handleCachedValue(CachedValue cv)
public abstract Object getValueFromReadCache(short key)
public void initiateClientSideProtocol(DataOutputStream dataOut, DataInputStream dataIn) throws JMSException
dataOut
- dataIn
-
JMSException
public void initiateServerSideProtocol(DataOutputStream dataOut, DataInputStream dataIn) throws JMSException
dataOut
- dataIn
-
JMSException
public abstract WireFormat copy()
WireFormat
copy
in interface WireFormat
public Packet readPacket(int firstByte, DataInput dataIn) throws IOException
WireFormat
readPacket
in interface WireFormat
firstByte
- dataIn
-
IOException
protected PacketWriter getWriter(Packet packet) throws IOException
IOException
public boolean canProcessWireFormatVersion(int version)
canProcessWireFormatVersion
in interface WireFormat
version
- the version number to test
public int getCurrentWireFormatVersion()
getCurrentWireFormatVersion
in interface WireFormat
public void setCurrentWireFormatVersion(int version)
version
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |