Package 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
Modifier and TypeMethodDescriptionbyte[]Retrieves the body byte array that travelled as part of this Command, if any.Retrieves the ContentHeader subclass instance held as part of this Command, if any.Retrieves theMethodheld within this Command.
-
Method Details
-
getMethod
Method getMethod()Retrieves theMethodheld 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 instanceAMQP.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
-