Package com.rabbitmq.client
Interface Command
-
- All Known Implementing Classes:
AMQCommand
public interface CommandInterface to a container for an AMQP method-and-arguments, with optional content header and body.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]getContentBody()Retrieves the body byte array that travelled as part of this Command, if any.ContentHeadergetContentHeader()Retrieves the ContentHeader subclass instance held as part of this Command, if any.MethodgetMethod()Retrieves theMethodheld within this Command.
-
-
-
Method Detail
-
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
-
-