org.apache.qpid.framing
Class AMQMethodBody

java.lang.Object
  extended by org.apache.qpid.framing.AMQBody
      extended by org.apache.qpid.framing.AMQMethodBody
Direct Known Subclasses:
AccessRequestBody, AccessRequestOkBody, BasicAckBody, BasicCancelBody, BasicCancelOkBody, BasicConsumeBody, BasicConsumeOkBody, BasicDeliverBody, BasicGetBody, BasicGetEmptyBody, BasicGetOkBody, BasicPublishBody, BasicQosBody, BasicQosOkBody, BasicRecoverBody, BasicRejectBody, BasicReturnBody, ChannelAlertBody, ChannelCloseBody, ChannelCloseOkBody, ChannelFlowBody, ChannelFlowOkBody, ChannelOpenBody, ChannelOpenOkBody, ClusterJoinBody, ClusterLeaveBody, ClusterMembershipBody, ClusterPingBody, ClusterSuspectBody, ClusterSynchBody, ConnectionCloseBody, ConnectionCloseOkBody, ConnectionOpenBody, ConnectionOpenOkBody, ConnectionRedirectBody, ConnectionSecureBody, ConnectionSecureOkBody, ConnectionStartBody, ConnectionStartOkBody, ConnectionTuneBody, ConnectionTuneOkBody, DtxSelectBody, DtxSelectOkBody, DtxStartBody, DtxStartOkBody, ExchangeDeclareBody, ExchangeDeclareOkBody, ExchangeDeleteBody, ExchangeDeleteOkBody, FileAckBody, FileCancelBody, FileCancelOkBody, FileConsumeBody, FileConsumeOkBody, FileDeliverBody, FileOpenBody, FileOpenOkBody, FilePublishBody, FileQosBody, FileQosOkBody, FileRejectBody, FileReturnBody, FileStageBody, QueueBindBody, QueueBindOkBody, QueueDeclareBody, QueueDeclareOkBody, QueueDeleteBody, QueueDeleteOkBody, QueuePurgeBody, QueuePurgeOkBody, StreamCancelBody, StreamCancelOkBody, StreamConsumeBody, StreamConsumeOkBody, StreamDeliverBody, StreamPublishBody, StreamQosBody, StreamQosOkBody, StreamReturnBody, TestContentBody, TestContentOkBody, TestIntegerBody, TestIntegerOkBody, TestStringBody, TestStringOkBody, TestTableBody, TestTableOkBody, TunnelRequestBody, TxCommitBody, TxCommitOkBody, TxRollbackBody, TxRollbackOkBody, TxSelectBody, TxSelectOkBody

public abstract class AMQMethodBody
extends AMQBody


Field Summary
static byte TYPE
           
 
Constructor Summary
AMQMethodBody()
           
 
Method Summary
protected abstract  int getBodySize()
          unsigned short
 AMQChannelException getChannelException(int code, java.lang.String message)
          Creates an AMQChannelException for the corresponding body type (a channel exception should include the class and method ids of the body it resulted from).
 AMQChannelException getChannelException(int code, java.lang.String message, java.lang.Throwable cause)
           
protected abstract  int getClazz()
           
protected abstract  int getMethod()
           
protected  int getSize()
          Get the size of the body
protected  byte getType()
           
protected  void populateFromBuffer(org.apache.mina.common.ByteBuffer buffer, long size)
           
protected abstract  void populateMethodBodyFromBuffer(org.apache.mina.common.ByteBuffer buffer)
           
 java.lang.String toString()
           
protected abstract  void writeMethodPayload(org.apache.mina.common.ByteBuffer buffer)
           
protected  void writePayload(org.apache.mina.common.ByteBuffer buffer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE

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

AMQMethodBody

public AMQMethodBody()
Method Detail

getBodySize

protected abstract int getBodySize()
unsigned short


getClazz

protected abstract int getClazz()
Returns:
unsigned short

getMethod

protected abstract int getMethod()
Returns:
unsigned short

writeMethodPayload

protected abstract void writeMethodPayload(org.apache.mina.common.ByteBuffer buffer)

getType

protected byte getType()
Specified by:
getType in class AMQBody

getSize

protected int getSize()
Description copied from class: AMQBody
Get the size of the body

Specified by:
getSize in class AMQBody
Returns:
unsigned short

writePayload

protected void writePayload(org.apache.mina.common.ByteBuffer buffer)
Specified by:
writePayload in class AMQBody

populateMethodBodyFromBuffer

protected abstract void populateMethodBodyFromBuffer(org.apache.mina.common.ByteBuffer buffer)
                                              throws AMQFrameDecodingException
Throws:
AMQFrameDecodingException

populateFromBuffer

protected void populateFromBuffer(org.apache.mina.common.ByteBuffer buffer,
                                  long size)
                           throws AMQFrameDecodingException
Specified by:
populateFromBuffer in class AMQBody
Throws:
AMQFrameDecodingException

toString

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

getChannelException

public AMQChannelException getChannelException(int code,
                                               java.lang.String message)
Creates an AMQChannelException for the corresponding body type (a channel exception should include the class and method ids of the body it resulted from).


getChannelException

public AMQChannelException getChannelException(int code,
                                               java.lang.String message,
                                               java.lang.Throwable cause)