org.apache.qpid.management.messages
Class ManagementMessage

java.lang.Object
  extended by org.apache.qpid.management.messages.ManagementMessage
All Implemented Interfaces:
org.apache.qpid.api.Message
Direct Known Subclasses:
MethodInvocationRequestMessage, SchemaRequestMessage

public abstract class ManagementMessage
extends Object
implements org.apache.qpid.api.Message

Message implementation used for specific management purposes.


Field Summary
protected  org.apache.qpid.transport.codec.BBEncoder _codec
           
protected  ByteBuffer _data
           
(package private)  org.apache.qpid.management.messages.ManagementMessage.IDataBuilderStrategy ACCUMULATING
          Strategy used for retrieving raw data from this message when it hasn't been already encoded.
(package private)  org.apache.qpid.management.messages.ManagementMessage.IDataBuilderStrategy READING
          Strategy used for retrieving raw data from this message when it has been already encoded.
 
Constructor Summary
ManagementMessage()
          Builds an empty management message.
 
Method Summary
 void appendData(byte[] src)
           
 void appendData(ByteBuffer src)
           
 void clearData()
           
 org.apache.qpid.transport.DeliveryProperties getDeliveryProperties()
          Returns the delivery properties of this message.
 org.apache.qpid.transport.Header getHeader()
          Returns the header of this message.
 org.apache.qpid.transport.MessageProperties getMessageProperties()
          Returns the messages header properties of this message.
 int getMessageTransferId()
          Returns the transfer Id of this message.
(package private) abstract  char opcode()
          Returns the opcode that will be used for this message.
 ByteBuffer readData()
          Returns the encoded data of this message.
 void readData(byte[] target)
           
protected  int sequenceNumber()
          Returns the sequence number that will be used for this message.
 void setHeader(org.apache.qpid.transport.Header header)
          Sets the header for this message.
(package private) abstract  void specificMessageEncoding()
          Concrete subclasses (message implementations) must define here their specific data encoding.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

READING

org.apache.qpid.management.messages.ManagementMessage.IDataBuilderStrategy READING
Strategy used for retrieving raw data from this message when it has been already encoded.


ACCUMULATING

org.apache.qpid.management.messages.ManagementMessage.IDataBuilderStrategy ACCUMULATING
Strategy used for retrieving raw data from this message when it hasn't been already encoded.


_codec

protected org.apache.qpid.transport.codec.BBEncoder _codec

_data

protected ByteBuffer _data
Constructor Detail

ManagementMessage

ManagementMessage()
Builds an empty management message.

Method Detail

sequenceNumber

protected int sequenceNumber()
Returns the sequence number that will be used for this message.

Returns:
the sequence number that will be used for this message.

opcode

abstract char opcode()
Returns the opcode that will be used for this message.

Returns:
the opcode that will be used for this message.

getDeliveryProperties

public org.apache.qpid.transport.DeliveryProperties getDeliveryProperties()
Returns the delivery properties of this message.

Specified by:
getDeliveryProperties in interface org.apache.qpid.api.Message
Returns:
the delivery properties of this message.

getHeader

public org.apache.qpid.transport.Header getHeader()
Returns the header of this message.

Specified by:
getHeader in interface org.apache.qpid.api.Message
Returns:
the header of this message.

getMessageProperties

public org.apache.qpid.transport.MessageProperties getMessageProperties()
Returns the messages header properties of this message.

Specified by:
getMessageProperties in interface org.apache.qpid.api.Message
Returns:
the message header properties of this message.

getMessageTransferId

public int getMessageTransferId()
Returns the transfer Id of this message.

Specified by:
getMessageTransferId in interface org.apache.qpid.api.Message
Returns:
the transfer Id of this message.

readData

public ByteBuffer readData()
                    throws IOException
Returns the encoded data of this message.

Specified by:
readData in interface org.apache.qpid.api.Message
Returns:
the encoded data of this message.
Throws:
IOException

setHeader

public void setHeader(org.apache.qpid.transport.Header header)
Sets the header for this message.

Specified by:
setHeader in interface org.apache.qpid.api.Message
Parameters:
header - the new message header.

appendData

public void appendData(byte[] src)
                throws IOException
Specified by:
appendData in interface org.apache.qpid.api.Message
Throws:
IOException

appendData

public void appendData(ByteBuffer src)
                throws IOException
Specified by:
appendData in interface org.apache.qpid.api.Message
Throws:
IOException

clearData

public void clearData()
Specified by:
clearData in interface org.apache.qpid.api.Message

readData

public void readData(byte[] target)
              throws IOException
Specified by:
readData in interface org.apache.qpid.api.Message
Throws:
IOException

specificMessageEncoding

abstract void specificMessageEncoding()
Concrete subclasses (message implementations) must define here their specific data encoding.



Licensed to the Apache Software Foundation