|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.rabbitmq.client.impl.AMQCommand
public class AMQCommand
| Nested Class Summary | |
|---|---|
class |
AMQCommand.Assembler
|
| Field Summary | |
|---|---|
static int |
EMPTY_CONTENT_BODY_FRAME_SIZE
Safety definition - see also checkEmptyContentBodyFrameSize() |
| Constructor Summary | |
|---|---|
AMQCommand()
Construct a command without any method, header or body. |
|
AMQCommand(Method method)
Construct a command with just a method, and without header or body. |
|
AMQCommand(Method method,
AMQContentHeader contentHeader,
byte[] body)
Construct a command with a specified method, header and body. |
|
| Method Summary | |
|---|---|
void |
appendBodyFragment(byte[] fragment)
|
static void |
checkEmptyContentBodyFrameSize()
Private API - Called to check internal consistency of the code. |
void |
coalesceContentBody()
Private API - Stitches together a fragmented content body into a single byte array. |
byte[] |
getContentBody()
Public API - Retrieves the body byte array that travelled as part of this Command, if any. |
ContentHeader |
getContentHeader()
Public API - Retrieves the ContentHeader subclass instance held as part of this Command, if any. |
AMQCommand.Assembler |
getFreshAssembler()
Private API - retrieves a fresh Assembler that writes into this AMQCommand. |
Method |
getMethod()
Public API - Retrieves the Method held within this Command. |
static AMQCommand.Assembler |
newAssembler()
Retrieve an Assembler assembling into a fresh AMQCommand object. |
void |
setContentBody(byte[] body)
Public API - Set the Command's content body. |
java.lang.String |
toString()
|
java.lang.String |
toString(boolean suppressBody)
|
void |
transmit(AMQChannel channel)
Sends this command down the named channel on the channel's connection, possibly in multiple frames. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int EMPTY_CONTENT_BODY_FRAME_SIZE
checkEmptyContentBodyFrameSize()
| Constructor Detail |
|---|
public AMQCommand()
public AMQCommand(Method method)
method - the wrapped method
public AMQCommand(Method method,
AMQContentHeader contentHeader,
byte[] body)
method - the wrapped methodcontentHeader - the wrapped content headerbody - the message body data| Method Detail |
|---|
public static AMQCommand.Assembler newAssembler()
public Method getMethod()
Method held within this Command. Downcast to
concrete (implementation-specific!) subclasses as necessary.
getMethod in interface Commandpublic ContentHeader getContentHeader()
AMQP.BasicProperties, as appropriate.
getContentHeader in interface CommandContentHeader, or null if nonepublic byte[] getContentBody()
getContentBody in interface Commandpublic void setContentBody(byte[] body)
body - the body datapublic void appendBodyFragment(byte[] fragment)
public void coalesceContentBody()
public AMQCommand.Assembler getFreshAssembler()
public void transmit(AMQChannel channel)
throws java.io.IOException
channel - the channel on which to transmit the command
java.io.IOException - if an error is encounteredpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toString(boolean suppressBody)
public static void checkEmptyContentBodyFrameSize()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||