public abstract class AMQMethodBodyImpl extends Object implements AMQMethodBody
| Modifier and Type | Field and Description |
|---|---|
static byte |
TYPE |
| Constructor and Description |
|---|
AMQMethodBodyImpl() |
| Modifier and Type | Method and Description |
|---|---|
AMQFrame |
generateFrame(int channelId) |
protected abstract int |
getBodySize()
unsigned short
|
AMQChannelException |
getChannelException(AMQConstant code,
String message,
MethodRegistry methodRegistry) |
AMQChannelException |
getChannelNotFoundException(int channelId,
MethodRegistry methodRegistry)
Convenience Method to create a channel not found exception
|
AMQConnectionException |
getConnectionException(AMQConstant code,
String message,
MethodRegistry methodRegistry) |
byte |
getFrameType() |
int |
getSize()
Get the size of the body
|
protected int |
getSizeOf(AMQShortString string) |
protected int |
getSizeOf(byte[] response) |
protected int |
getSizeOf(FieldTable table) |
void |
handle(int channelId,
AMQVersionAwareProtocolSession session) |
protected int |
readInt(DataInput buffer) |
protected short |
readShort(DataInput buffer) |
protected long |
readTimestamp(DataInput buffer) |
protected void |
writeAMQShortString(DataOutput buffer,
AMQShortString string) |
protected void |
writeBitfield(DataOutput buffer,
byte bitfield0) |
protected void |
writeByte(DataOutput buffer,
byte b) |
protected void |
writeBytes(DataOutput buffer,
byte[] data) |
protected void |
writeFieldTable(DataOutput buffer,
FieldTable table) |
protected void |
writeInt(DataOutput buffer,
int i) |
protected void |
writeLong(DataOutput buffer,
long l) |
long |
writePayload(ByteBufferSender sender) |
void |
writePayload(DataOutput buffer) |
protected void |
writeShort(DataOutput buffer,
short s) |
protected void |
writeTimestamp(DataOutput buffer,
long t) |
protected void |
writeUnsignedByte(DataOutput buffer,
short unsignedByte) |
protected void |
writeUnsignedInteger(DataOutput buffer,
long i) |
protected void |
writeUnsignedShort(DataOutput buffer,
int s) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexecute, getClazz, getMethod, toString, writeMethodPayloadpublic static final byte TYPE
public byte getFrameType()
getFrameType in interface AMQBodyprotected abstract int getBodySize()
public AMQFrame generateFrame(int channelId)
generateFrame in interface AMQMethodBodypublic AMQChannelException getChannelNotFoundException(int channelId, MethodRegistry methodRegistry)
getChannelNotFoundException in interface AMQMethodBodychannelId - The channel id that is not foundmethodRegistry - public AMQChannelException getChannelException(AMQConstant code, String message, MethodRegistry methodRegistry)
getChannelException in interface AMQMethodBodypublic AMQConnectionException getConnectionException(AMQConstant code, String message, MethodRegistry methodRegistry)
getConnectionException in interface AMQMethodBodypublic void handle(int channelId,
AMQVersionAwareProtocolSession session)
throws QpidException
handle in interface AMQBodyQpidExceptionpublic int getSize()
AMQBodygetSize in interface AMQBodygetSize in interface AMQMethodBodypublic void writePayload(DataOutput buffer) throws IOException
writePayload in interface AMQBodywritePayload in interface AMQMethodBodyIOExceptionpublic long writePayload(ByteBufferSender sender) throws IOException
writePayload in interface AMQBodyIOExceptionprotected int getSizeOf(AMQShortString string)
protected void writeByte(DataOutput buffer, byte b) throws IOException
IOExceptionprotected void writeAMQShortString(DataOutput buffer, AMQShortString string) throws IOException
IOExceptionprotected int readInt(DataInput buffer) throws IOException
IOExceptionprotected void writeInt(DataOutput buffer, int i) throws IOException
IOExceptionprotected int getSizeOf(FieldTable table)
protected void writeFieldTable(DataOutput buffer, FieldTable table) throws IOException
IOExceptionprotected void writeLong(DataOutput buffer, long l) throws IOException
IOExceptionprotected int getSizeOf(byte[] response)
protected void writeBytes(DataOutput buffer, byte[] data) throws IOException
IOExceptionprotected short readShort(DataInput buffer) throws IOException
IOExceptionprotected void writeShort(DataOutput buffer, short s) throws IOException
IOExceptionprotected void writeBitfield(DataOutput buffer, byte bitfield0) throws IOException
IOExceptionprotected void writeUnsignedShort(DataOutput buffer, int s) throws IOException
IOExceptionprotected void writeUnsignedInteger(DataOutput buffer, long i) throws IOException
IOExceptionprotected void writeUnsignedByte(DataOutput buffer, short unsignedByte) throws IOException
IOExceptionprotected long readTimestamp(DataInput buffer) throws IOException
IOExceptionprotected void writeTimestamp(DataOutput buffer, long t) throws IOException
IOExceptionCopyright © 2006–2017 The Apache Software Foundation. All rights reserved.