Sonic Management API

com.sonicsw.mq.common.runtime
Interface IMessageHeader


public interface IMessageHeader

This interface provides access to message property information for the Management Framework. The access into the properties abides by the same rules as JMS properties.

All the methods methods below can throw an MFException "If used improperly". For all methods with a related JMS method, an MFException can be thrown for the same reason as what is specified within the JMS javadoc and specification. Please see javax.jms.Message for more information.

See Also:
Message

Method Summary
 boolean getBooleanProperty(java.lang.String name)
          Retrieve a boolean property from this message.
 java.lang.String getBrokerName()
          Retrieve the broker name this message was retrieved from.
 byte getByteProperty(java.lang.String name)
          Retrieve a byte property from this message.
 double getDoubleProperty(java.lang.String name)
          Retrieve a double property from this message.
 float getFloatProperty(java.lang.String name)
          Retrieve a float property from this message.
 int getIntProperty(java.lang.String name)
          Retrieve a int property from this message.
 java.lang.String getJMSCorrelationID()
          Retrieve the JMSCorrelationID
 byte[] getJMSCorrelationIDAsBytes()
          Retrieve the JMSCorrelationID as bytes
 int getJMSDeliveryMode()
          Retrieve the JMSDeliveryMode
 IDestination getJMSDestination()
          Get the JMSDestination
 long getJMSExpiration()
          Retrieve the JMS expiration
 java.lang.String getJMSMessageID()
          Retrieve the JMSMessageID
 int getJMSPriority()
          Retrieve the JMS priority
 boolean getJMSRedelivered()
          Retrieve the JMS redelivered flag
 IDestination getJMSReplyTo()
          Get the JMSReplyTo.
 long getJMSTimestamp()
          Get the JMS timestamp.
 java.lang.String getJMSType()
          Get the JMS type
 long getLongProperty(java.lang.String name)
          Retrieve a long property
 java.lang.Object getObjectProperty(java.lang.String name)
          Retrieve a Object property
 java.util.Enumeration getPropertyNames()
          Retrieve the property names
 short getShortProperty(java.lang.String name)
          Retrieve a short property
 java.lang.String getStringProperty(java.lang.String name)
          Retrieve a String property
 IMessageHeaderToken getToken()
          Retrieve a IMessageHeaderToken that represents this message.
 boolean propertyExists(java.lang.String name)
          Test whether or not a given property name exists.
 

Method Detail

getBooleanProperty

boolean getBooleanProperty(java.lang.String name)
                           throws MFException
Retrieve a boolean property from this message.

Parameters:
name - The name of the property to retrieve.
Returns:
The boolean value
Throws:
MFException - If the method is used improperly.
See Also:
Message.getBooleanProperty( String )

getBrokerName

java.lang.String getBrokerName()
                               throws MFException
Retrieve the broker name this message was retrieved from.

Returns:
the broker name
Throws:
MFException

getByteProperty

byte getByteProperty(java.lang.String name)
                     throws MFException
Retrieve a byte property from this message.

Parameters:
name - The name of the property to retrieve.
Returns:
The byte value
Throws:
MFException - If the method is used improperly.
See Also:
Message.getByteProperty( String )

getDoubleProperty

double getDoubleProperty(java.lang.String name)
                         throws MFException
Retrieve a double property from this message.

Parameters:
name - The name of the property to retrieve.
Returns:
The double value
Throws:
MFException - If the method is used improperly.
See Also:
Message.getDoubleProperty( String )

getFloatProperty

float getFloatProperty(java.lang.String name)
                       throws MFException
Retrieve a float property from this message.

Parameters:
name - The name of the property to retrieve.
Returns:
The float value
Throws:
MFException - If the method is used improperly.
See Also:
Message.getFloatProperty( String )

getIntProperty

int getIntProperty(java.lang.String name)
                   throws MFException
Retrieve a int property from this message.

Parameters:
name - The name of the property to retrieve.
Returns:
The int value
Throws:
MFException - If the method is used improperly.
See Also:
Message.getIntProperty( String )

getJMSCorrelationID

java.lang.String getJMSCorrelationID()
                                     throws MFException
Retrieve the JMSCorrelationID

Returns:
The JMSCorrelationID or null if not set
Throws:
MFException - If the method is used improperly.
See Also:
javax.jms.Message#getJMSCorrelationID( String )

getJMSCorrelationIDAsBytes

byte[] getJMSCorrelationIDAsBytes()
                                  throws MFException
Retrieve the JMSCorrelationID as bytes

Returns:
The JMSCorrelationID as a byte array, or null if not set
Throws:
MFException - If the method is used improperly.
See Also:
Message.getJMSCorrelationIDAsBytes()

getJMSDeliveryMode

int getJMSDeliveryMode()
                       throws MFException
Retrieve the JMSDeliveryMode

Returns:
The delivery mode
Throws:
MFException - If used improperly.
See Also:
Message.getJMSDeliveryMode()

getJMSDestination

IDestination getJMSDestination()
                               throws MFException
Get the JMSDestination

Returns:
An IDestination obect representing the JMS destination
Throws:
MFException - If used improperly
See Also:
Message.getJMSDestination()

getJMSExpiration

long getJMSExpiration()
                      throws MFException
Retrieve the JMS expiration

Returns:
The JMS expiration value
Throws:
MFException - If used improperly
See Also:
Message.getJMSExpiration()

getJMSMessageID

java.lang.String getJMSMessageID()
                                 throws MFException
Retrieve the JMSMessageID

Returns:
The JMSMessageID, null if not found
Throws:
MFException - If used improperly
See Also:
Message.getJMSMessageID()

getJMSPriority

int getJMSPriority()
                   throws MFException
Retrieve the JMS priority

Returns:
The JMS priority
Throws:
MFException - If used improperly
See Also:
Message.getJMSPriority()

getJMSRedelivered

boolean getJMSRedelivered()
                          throws MFException
Retrieve the JMS redelivered flag

Returns:
The JMS redelivered flag
Throws:
MFException - If used improperly
See Also:
Message.getJMSRedelivered()

getJMSReplyTo

IDestination getJMSReplyTo()
                           throws MFException
Get the JMSReplyTo.

Returns:
An IDestination that represents a JMS destination
Throws:
MFException - If used improperly
See Also:
Message.getJMSReplyTo()

getJMSTimestamp

long getJMSTimestamp()
                     throws MFException
Get the JMS timestamp.

Returns:
The JMS timestamp
Throws:
MFException - If used improperly
See Also:
Message.getJMSTimestamp()

getJMSType

java.lang.String getJMSType()
                            throws MFException
Get the JMS type

Returns:
The JMS type, null if not set
Throws:
MFException - If used improperly
See Also:
Message.getJMSType()

getLongProperty

long getLongProperty(java.lang.String name)
                     throws MFException
Retrieve a long property

Parameters:
name - The name of the property to retrieve
Returns:
The long value
Throws:
MFException - If used improperly
See Also:
Message.getLongProperty( String )

getObjectProperty

java.lang.Object getObjectProperty(java.lang.String name)
                                   throws MFException
Retrieve a Object property

Parameters:
name - The name of the property to retrieve
Returns:
The Object value
Throws:
MFException - If used improperly
See Also:
Message.getObjectProperty( String )

getPropertyNames

java.util.Enumeration getPropertyNames()
                                       throws MFException
Retrieve the property names

Returns:
An enumeration of String objects representing the property names
Throws:
MFException - If used improperly
See Also:
Message.getPropertyNames()

getShortProperty

short getShortProperty(java.lang.String name)
                       throws MFException
Retrieve a short property

Parameters:
name - The name of the property to retrieve
Returns:
The short value
Throws:
MFException - If used improperly
See Also:
Message.getShortProperty( String )

getStringProperty

java.lang.String getStringProperty(java.lang.String name)
                                   throws MFException
Retrieve a String property

Parameters:
name - The name of the property to retrieve
Returns:
The String value
Throws:
MFException - If used improperly
See Also:
javax.jms.Message#getStringPropeBrty( String )

getToken

IMessageHeaderToken getToken()
                             throws MFException
Retrieve a IMessageHeaderToken that represents this message. This method retrieves a IMessageHeaderToken that can be used in other management operations (such as removeBrowseMessage).

Returns:
An IMessageHeaderToken that represents this message.
Throws:
MFException - If the method is used improperly

propertyExists

boolean propertyExists(java.lang.String name)
                       throws MFException
Test whether or not a given property name exists.

Parameters:
name - The name of the property to test
Returns:
true if the property exists, false if not
Throws:
MFException - If used improperly
See Also:
Message.propertyExists( String )

Sonic Management API

Copyright © 2001-2011 Progress Software Corporation. All Rights Reserved.
HTML formatted on 12-Aug-2011.