com.rabbitmq.client
Interface Command

All Known Implementing Classes:
AMQCommand

public interface Command

Interface to a container for an AMQP method-and-arguments, with optional content header and body.


Method Summary
 byte[] getContentBody()
          Retrieves the body byte array that travelled as part of this Command, if any.
 ContentHeader getContentHeader()
          Retrieves the ContentHeader subclass instance held as part of this Command, if any.
 Method getMethod()
          Retrieves the Method held within this Command.
 

Method Detail

getMethod

Method getMethod()
Retrieves the Method held within this Command. Downcast to concrete (implementation-specific!) subclasses as necessary.

Returns:
the command's method.

getContentHeader

ContentHeader getContentHeader()
Retrieves the ContentHeader subclass instance held as part of this Command, if any. Downcast to one of the inner classes of AMQP, for instance AMQP.BasicProperties, as appropriate.

Returns:
the Command's ContentHeader, or null if none

getContentBody

byte[] getContentBody()
Retrieves the body byte array that travelled as part of this Command, if any.

Returns:
the Command's content body, or null if none