org.jboss.messaging.core.remoting.impl.wireformat
Class PacketImpl

java.lang.Object
  extended by org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl
All Implemented Interfaces:
Packet
Direct Known Subclasses:
CreateQueueMessage, CreateSessionMessage, CreateSessionResponseMessage, MessagingExceptionMessage, NullResponseMessage, PacketsConfirmedMessage, Ping, ReattachSessionMessage, ReattachSessionResponseMessage, ReplicateAcknowledgeMessage, ReplicateCreateSessionMessage, ReplicateRedistributionMessage, ReplicateRemoteBindingAddedMessage, ReplicateRemoteBindingRemovedMessage, ReplicateRemoteConsumerAddedMessage, ReplicateRemoteConsumerRemovedMessage, ReplicateStartupInfoMessage, RollbackMessage, SessionAcknowledgeMessage, SessionBindingQueryMessage, SessionBindingQueryResponseMessage, SessionCloseMessage, SessionConsumerCloseMessage, SessionConsumerFlowCreditMessage, SessionContinuationMessage, SessionCreateConsumerMessage, SessionDeleteQueueMessage, SessionExpiredMessage, SessionFailoverCompleteMessage, SessionQueueQueryMessage, SessionQueueQueryResponseMessage, SessionReceiveMessage, SessionReplicateDeliveryMessage, SessionSendLargeMessage, SessionSendMessage, SessionXACommitMessage, SessionXAEndMessage, SessionXAForgetMessage, SessionXAGetInDoubtXidsResponseMessage, SessionXAGetTimeoutResponseMessage, SessionXAJoinMessage, SessionXAPrepareMessage, SessionXAResponseMessage, SessionXAResumeMessage, SessionXARollbackMessage, SessionXASetTimeoutMessage, SessionXASetTimeoutResponseMessage, SessionXAStartMessage

public class PacketImpl
extends java.lang.Object
implements Packet

Version:
$Revision$
Author:
Jeff Mesnil, Tim Fox

Field Summary
protected static int BASIC_PACKET_SIZE
           
static byte CREATE_QUEUE
           
static byte CREATESESSION
           
static byte CREATESESSION_RESP
           
static byte DELETE_QUEUE
           
static byte DISCONNECT
           
static byte EARLY_RESPONSE
           
static byte EXCEPTION
           
static byte NULL_RESPONSE
           
static byte PACKETS_CONFIRMED
           
static byte PING
           
static byte REATTACH_SESSION
           
static byte REATTACH_SESSION_RESP
           
static byte REPLICATE_ACKNOWLEDGE
           
static byte REPLICATE_ADD_REMOTE_CONSUMER
           
static byte REPLICATE_ADD_REMOTE_QUEUE_BINDING
           
static byte REPLICATE_CREATESESSION
           
static byte REPLICATE_REDISTRIBUTION
           
static byte REPLICATE_REMOVE_REMOTE_CONSUMER
           
static byte REPLICATE_REMOVE_REMOTE_QUEUE_BINDING
           
static byte REPLICATE_STARTUP_INFO
           
static byte REPLICATION_RESPONSE
           
static byte SESS_ACKNOWLEDGE
           
static byte SESS_BINDINGQUERY
           
static byte SESS_BINDINGQUERY_RESP
           
static byte SESS_CLOSE
           
static byte SESS_COMMIT
           
static byte SESS_CONSUMER_CLOSE
           
static byte SESS_CREATECONSUMER
           
static byte SESS_EXPIRED
           
static byte SESS_FAILOVER_COMPLETE
           
static byte SESS_FLOWTOKEN
           
static byte SESS_QUEUEQUERY
           
static byte SESS_QUEUEQUERY_RESP
           
static byte SESS_RECEIVE_CONTINUATION
           
static byte SESS_RECEIVE_MSG
           
static byte SESS_REPLICATE_DELIVERY
           
static byte SESS_ROLLBACK
           
static byte SESS_SEND
           
static byte SESS_SEND_CONTINUATION
           
static byte SESS_SEND_LARGE
           
static byte SESS_START
           
static byte SESS_STOP
           
static byte SESS_XA_COMMIT
           
static byte SESS_XA_END
           
static byte SESS_XA_FORGET
           
static byte SESS_XA_GET_TIMEOUT
           
static byte SESS_XA_GET_TIMEOUT_RESP
           
static byte SESS_XA_INDOUBT_XIDS
           
static byte SESS_XA_INDOUBT_XIDS_RESP
           
static byte SESS_XA_JOIN
           
static byte SESS_XA_PREPARE
           
static byte SESS_XA_RESP
           
static byte SESS_XA_RESUME
           
static byte SESS_XA_ROLLBACK
           
static byte SESS_XA_SET_TIMEOUT
           
static byte SESS_XA_SET_TIMEOUT_RESP
           
static byte SESS_XA_START
           
static byte SESS_XA_SUSPEND
           
 
Constructor Summary
PacketImpl(byte type)
           
 
Method Summary
 void decode(MessagingBuffer buffer)
           
 void decodeBody(MessagingBuffer buffer)
           
 int encode(MessagingBuffer buffer)
           
 void encodeBody(MessagingBuffer buffer)
           
 boolean equals(java.lang.Object other)
           
 long getChannelID()
           
 int getPacketSize()
           
protected  java.lang.String getParentString()
           
 int getRequiredBufferSize()
           
 byte getType()
           
 boolean isRequiresConfirmations()
           
 boolean isResponse()
           
 boolean isWriteAlways()
           
protected  int nullableStringEncodeSize(java.lang.String str)
           
 void setChannelID(long channelID)
           
protected  int stringEncodeSize(java.lang.String str)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BASIC_PACKET_SIZE

protected static final int BASIC_PACKET_SIZE
See Also:
Constant Field Values

PING

public static final byte PING
See Also:
Constant Field Values

DISCONNECT

public static final byte DISCONNECT
See Also:
Constant Field Values

EXCEPTION

public static final byte EXCEPTION
See Also:
Constant Field Values

NULL_RESPONSE

public static final byte NULL_RESPONSE
See Also:
Constant Field Values

PACKETS_CONFIRMED

public static final byte PACKETS_CONFIRMED
See Also:
Constant Field Values

REPLICATION_RESPONSE

public static final byte REPLICATION_RESPONSE
See Also:
Constant Field Values

EARLY_RESPONSE

public static final byte EARLY_RESPONSE
See Also:
Constant Field Values

CREATESESSION

public static final byte CREATESESSION
See Also:
Constant Field Values

CREATESESSION_RESP

public static final byte CREATESESSION_RESP
See Also:
Constant Field Values

REATTACH_SESSION

public static final byte REATTACH_SESSION
See Also:
Constant Field Values

REATTACH_SESSION_RESP

public static final byte REATTACH_SESSION_RESP
See Also:
Constant Field Values

REPLICATE_CREATESESSION

public static final byte REPLICATE_CREATESESSION
See Also:
Constant Field Values

CREATE_QUEUE

public static final byte CREATE_QUEUE
See Also:
Constant Field Values

DELETE_QUEUE

public static final byte DELETE_QUEUE
See Also:
Constant Field Values

SESS_CREATECONSUMER

public static final byte SESS_CREATECONSUMER
See Also:
Constant Field Values

SESS_ACKNOWLEDGE

public static final byte SESS_ACKNOWLEDGE
See Also:
Constant Field Values

SESS_EXPIRED

public static final byte SESS_EXPIRED
See Also:
Constant Field Values

SESS_COMMIT

public static final byte SESS_COMMIT
See Also:
Constant Field Values

SESS_ROLLBACK

public static final byte SESS_ROLLBACK
See Also:
Constant Field Values

SESS_QUEUEQUERY

public static final byte SESS_QUEUEQUERY
See Also:
Constant Field Values

SESS_QUEUEQUERY_RESP

public static final byte SESS_QUEUEQUERY_RESP
See Also:
Constant Field Values

SESS_BINDINGQUERY

public static final byte SESS_BINDINGQUERY
See Also:
Constant Field Values

SESS_BINDINGQUERY_RESP

public static final byte SESS_BINDINGQUERY_RESP
See Also:
Constant Field Values

SESS_XA_START

public static final byte SESS_XA_START
See Also:
Constant Field Values

SESS_XA_END

public static final byte SESS_XA_END
See Also:
Constant Field Values

SESS_XA_COMMIT

public static final byte SESS_XA_COMMIT
See Also:
Constant Field Values

SESS_XA_PREPARE

public static final byte SESS_XA_PREPARE
See Also:
Constant Field Values

SESS_XA_RESP

public static final byte SESS_XA_RESP
See Also:
Constant Field Values

SESS_XA_ROLLBACK

public static final byte SESS_XA_ROLLBACK
See Also:
Constant Field Values

SESS_XA_JOIN

public static final byte SESS_XA_JOIN
See Also:
Constant Field Values

SESS_XA_SUSPEND

public static final byte SESS_XA_SUSPEND
See Also:
Constant Field Values

SESS_XA_RESUME

public static final byte SESS_XA_RESUME
See Also:
Constant Field Values

SESS_XA_FORGET

public static final byte SESS_XA_FORGET
See Also:
Constant Field Values

SESS_XA_INDOUBT_XIDS

public static final byte SESS_XA_INDOUBT_XIDS
See Also:
Constant Field Values

SESS_XA_INDOUBT_XIDS_RESP

public static final byte SESS_XA_INDOUBT_XIDS_RESP
See Also:
Constant Field Values

SESS_XA_SET_TIMEOUT

public static final byte SESS_XA_SET_TIMEOUT
See Also:
Constant Field Values

SESS_XA_SET_TIMEOUT_RESP

public static final byte SESS_XA_SET_TIMEOUT_RESP
See Also:
Constant Field Values

SESS_XA_GET_TIMEOUT

public static final byte SESS_XA_GET_TIMEOUT
See Also:
Constant Field Values

SESS_XA_GET_TIMEOUT_RESP

public static final byte SESS_XA_GET_TIMEOUT_RESP
See Also:
Constant Field Values

SESS_START

public static final byte SESS_START
See Also:
Constant Field Values

SESS_STOP

public static final byte SESS_STOP
See Also:
Constant Field Values

SESS_CLOSE

public static final byte SESS_CLOSE
See Also:
Constant Field Values

SESS_FLOWTOKEN

public static final byte SESS_FLOWTOKEN
See Also:
Constant Field Values

SESS_SEND

public static final byte SESS_SEND
See Also:
Constant Field Values

SESS_SEND_LARGE

public static final byte SESS_SEND_LARGE
See Also:
Constant Field Values

SESS_SEND_CONTINUATION

public static final byte SESS_SEND_CONTINUATION
See Also:
Constant Field Values

SESS_CONSUMER_CLOSE

public static final byte SESS_CONSUMER_CLOSE
See Also:
Constant Field Values

SESS_RECEIVE_MSG

public static final byte SESS_RECEIVE_MSG
See Also:
Constant Field Values

SESS_RECEIVE_CONTINUATION

public static final byte SESS_RECEIVE_CONTINUATION
See Also:
Constant Field Values

SESS_FAILOVER_COMPLETE

public static final byte SESS_FAILOVER_COMPLETE
See Also:
Constant Field Values

SESS_REPLICATE_DELIVERY

public static final byte SESS_REPLICATE_DELIVERY
See Also:
Constant Field Values

REPLICATE_ADD_REMOTE_QUEUE_BINDING

public static final byte REPLICATE_ADD_REMOTE_QUEUE_BINDING
See Also:
Constant Field Values

REPLICATE_REMOVE_REMOTE_QUEUE_BINDING

public static final byte REPLICATE_REMOVE_REMOTE_QUEUE_BINDING
See Also:
Constant Field Values

REPLICATE_ADD_REMOTE_CONSUMER

public static final byte REPLICATE_ADD_REMOTE_CONSUMER
See Also:
Constant Field Values

REPLICATE_REMOVE_REMOTE_CONSUMER

public static final byte REPLICATE_REMOVE_REMOTE_CONSUMER
See Also:
Constant Field Values

REPLICATE_ACKNOWLEDGE

public static final byte REPLICATE_ACKNOWLEDGE
See Also:
Constant Field Values

REPLICATE_STARTUP_INFO

public static final byte REPLICATE_STARTUP_INFO
See Also:
Constant Field Values

REPLICATE_REDISTRIBUTION

public static final byte REPLICATE_REDISTRIBUTION
See Also:
Constant Field Values
Constructor Detail

PacketImpl

public PacketImpl(byte type)
Method Detail

getType

public byte getType()
Specified by:
getType in interface Packet

getChannelID

public long getChannelID()
Specified by:
getChannelID in interface Packet

setChannelID

public void setChannelID(long channelID)
Specified by:
setChannelID in interface Packet

encode

public int encode(MessagingBuffer buffer)
Specified by:
encode in interface Packet

decode

public void decode(MessagingBuffer buffer)
Specified by:
decode in interface Packet

getPacketSize

public final int getPacketSize()
Specified by:
getPacketSize in interface Packet

getRequiredBufferSize

public int getRequiredBufferSize()
Specified by:
getRequiredBufferSize in interface Packet

isResponse

public boolean isResponse()
Specified by:
isResponse in interface Packet

encodeBody

public void encodeBody(MessagingBuffer buffer)

decodeBody

public void decodeBody(MessagingBuffer buffer)

isRequiresConfirmations

public boolean isRequiresConfirmations()
Specified by:
isRequiresConfirmations in interface Packet

isWriteAlways

public boolean isWriteAlways()
Specified by:
isWriteAlways in interface Packet

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

getParentString

protected java.lang.String getParentString()

stringEncodeSize

protected int stringEncodeSize(java.lang.String str)

nullableStringEncodeSize

protected int nullableStringEncodeSize(java.lang.String str)


Copyright © 2006 JBoss Inc. All Rights Reserved.