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, wait
execute, getClazz, getMethod, toString, writeMethodPayload
public static final byte TYPE
public byte getFrameType()
getFrameType
in interface AMQBody
protected abstract int getBodySize()
public AMQFrame generateFrame(int channelId)
generateFrame
in interface AMQMethodBody
public AMQChannelException getChannelNotFoundException(int channelId, MethodRegistry methodRegistry)
getChannelNotFoundException
in interface AMQMethodBody
channelId
- The channel id that is not foundmethodRegistry
- public AMQChannelException getChannelException(AMQConstant code, String message, MethodRegistry methodRegistry)
getChannelException
in interface AMQMethodBody
public AMQConnectionException getConnectionException(AMQConstant code, String message, MethodRegistry methodRegistry)
getConnectionException
in interface AMQMethodBody
public void handle(int channelId, AMQVersionAwareProtocolSession session) throws QpidException
handle
in interface AMQBody
QpidException
public int getSize()
AMQBody
getSize
in interface AMQBody
getSize
in interface AMQMethodBody
public void writePayload(DataOutput buffer) throws IOException
writePayload
in interface AMQBody
writePayload
in interface AMQMethodBody
IOException
public long writePayload(ByteBufferSender sender) throws IOException
writePayload
in interface AMQBody
IOException
protected int getSizeOf(AMQShortString string)
protected void writeByte(DataOutput buffer, byte b) throws IOException
IOException
protected void writeAMQShortString(DataOutput buffer, AMQShortString string) throws IOException
IOException
protected int readInt(DataInput buffer) throws IOException
IOException
protected void writeInt(DataOutput buffer, int i) throws IOException
IOException
protected int getSizeOf(FieldTable table)
protected void writeFieldTable(DataOutput buffer, FieldTable table) throws IOException
IOException
protected void writeLong(DataOutput buffer, long l) throws IOException
IOException
protected int getSizeOf(byte[] response)
protected void writeBytes(DataOutput buffer, byte[] data) throws IOException
IOException
protected short readShort(DataInput buffer) throws IOException
IOException
protected void writeShort(DataOutput buffer, short s) throws IOException
IOException
protected void writeBitfield(DataOutput buffer, byte bitfield0) throws IOException
IOException
protected void writeUnsignedShort(DataOutput buffer, int s) throws IOException
IOException
protected void writeUnsignedInteger(DataOutput buffer, long i) throws IOException
IOException
protected void writeUnsignedByte(DataOutput buffer, short unsignedByte) throws IOException
IOException
protected long readTimestamp(DataInput buffer) throws IOException
IOException
protected void writeTimestamp(DataOutput buffer, long t) throws IOException
IOException
Copyright © 2006–2016 The Apache Software Foundation. All rights reserved.