Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.1.3)

Part Number E41849-02

weblogic.messaging.runtime
Class MessageInfo

java.lang.Object
  extended by weblogic.messaging.runtime.MessageInfo
Direct Known Subclasses:
JMSMessageInfo

public abstract class MessageInfo
extends Object

This class encapsulates message meta-data that describes the context of a message as it exists in the server at a given point in time. Instances of this class are created by the JMX message management APIs that are used for the browsing and manipulation of messages in the system. These APIs return a CompositeData representation of the object.

See Also:
CompositeData, MessageCursorRuntimeMBean

Field Summary
protected  String consumerID
           
protected  Long handle
           
protected static String ITEM_CONSUMER_ID
           
protected static String ITEM_HANDLE
           
protected static String ITEM_SEQUENCE_NUMBER
           
protected static String ITEM_STATE
           
protected static String ITEM_XID_STRING
           
protected  ArrayList openItemDescriptions
           
protected  ArrayList openItemNames
           
protected  ArrayList openItemTypes
           
protected  long sequenceNumber
           
protected  int state
           
static int STATE_DELAYED
           Indicates that the message exists on the destination but is classified as pending because it has a scheduled delivery time or is delayed.
static int STATE_EXPIRED
           Indicates that the message has expired and is no longer available for consumption.
static int STATE_ORDERED
           Indicates that the message belongs to a Unit of Order.
static int STATE_PAUSED
           Indicates that the message exists on the destination but is being held in a pending state because of a pause operation.
static int STATE_RECEIVE
           Indicates that the message exists on the destination but is classified as pending because it has been received but not acknowledged.
static int STATE_REDELIVERY_COUNT_EXCEEDED
           Indicates that the message has exceeded the redelivery count set for the destination and is no longer available for consumption.
static int STATE_SEND
           Indicates that the message exists on the destination but is classified as pending because it is part of a send operation that is in progress.
static int STATE_TRANSACTION
           Indicates that the message exists on the destination but is classified as pending because it is part of a send or receive operation that is being performed as part of a global transaction.
static int STATE_VISIBLE
           Indicates that the message is visible on the destination.
protected  String stateString
           
protected  String xidString
           
 
Constructor Summary
protected MessageInfo()
          Default constructor.
  MessageInfo(CompositeData cd)
           Creates an instance from a CompositeData represenation.
  MessageInfo(long handle, int state, String xidString, long sequenceNumber, String consumerID)
           Construct an instance with the specified attributes.
 
Method Summary
protected  Map getCompositeDataMap()
           
protected  CompositeType getCompositeType()
           
 String getConsumerID()
           Returns the consumer ID for the message.
 Long getHandle()
           Returns the cursor handle associated with this message.
 long getSequenceNumber()
           Returns the sequence number of the message.
 int getState()
           Returns the state of the message at the time the runtime query was performed as a bitmask of state constants defined above.
 String getStateString()
           Returns a string representation of the state of the message.
static String getStateString(int state)
           Returns the string representation of the specified state bitmask.
 String getXidString()
           Returns the Xid of the global transaction that the message was associated with at the time the management operation was performed.
protected  void initOpenInfo()
           
protected  void readCompositeData(CompositeData cd)
           
 void setConsumerID(String consumerID)
           Sets the consumer ID attribute.
 void setHandle(Long handle)
           Sets the cursor handle attribute.
 void setSequenceNumber(long sequenceNumber)
           Sets the sequence number attribute.
 void setState(int state)
           Sets the state of the message.
 void setXidString(String xidString)
           Sets the Xid attribute.
 CompositeData toCompositeData()
           Converts the instance to a CompositeData representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATE_VISIBLE

public static final int STATE_VISIBLE

Indicates that the message is visible on the destination.

See Also:
MessageInfo.getState(), Constant Field Values

STATE_ORDERED

public static final int STATE_ORDERED

Indicates that the message belongs to a Unit of Order.

See Also:
MessageInfo.getState(), Constant Field Values

STATE_DELAYED

public static final int STATE_DELAYED

Indicates that the message exists on the destination but is classified as pending because it has a scheduled delivery time or is delayed.

See Also:
MessageInfo.getState(), Constant Field Values

STATE_RECEIVE

public static final int STATE_RECEIVE

Indicates that the message exists on the destination but is classified as pending because it has been received but not acknowledged. The actual state may also include STATE_TRANSACTION if the receive operation was performed as part of a transaction.

See Also:
MessageInfo.getState(), MessageInfo.STATE_TRANSACTION, Constant Field Values

STATE_SEND

public static final int STATE_SEND

Indicates that the message exists on the destination but is classified as pending because it is part of a send operation that is in progress. The actual state may also include STATE_TRANSACTION if the send operation was perfromed as part of a transaction.

See Also:
MessageInfo.getState(), MessageInfo.STATE_TRANSACTION, Constant Field Values

STATE_TRANSACTION

public static final int STATE_TRANSACTION

Indicates that the message exists on the destination but is classified as pending because it is part of a send or receive operation that is being performed as part of a global transaction.

See Also:
MessageInfo.getState(), MessageInfo.STATE_RECEIVE, MessageInfo.STATE_SEND, Constant Field Values

STATE_PAUSED

public static final int STATE_PAUSED

Indicates that the message exists on the destination but is being held in a pending state because of a pause operation.

See Also:
MessageInfo.getState(), Constant Field Values

STATE_REDELIVERY_COUNT_EXCEEDED

public static final int STATE_REDELIVERY_COUNT_EXCEEDED

Indicates that the message has exceeded the redelivery count set for the destination and is no longer available for consumption.

See Also:
MessageInfo.getState(), Constant Field Values

STATE_EXPIRED

public static final int STATE_EXPIRED

Indicates that the message has expired and is no longer available for consumption.

See Also:
MessageInfo.getState(), Constant Field Values

openItemNames

protected ArrayList openItemNames

openItemDescriptions

protected ArrayList openItemDescriptions

openItemTypes

protected ArrayList openItemTypes

ITEM_HANDLE

protected static final String ITEM_HANDLE
See Also:
Constant Field Values

ITEM_STATE

protected static final String ITEM_STATE
See Also:
Constant Field Values

ITEM_XID_STRING

protected static final String ITEM_XID_STRING
See Also:
Constant Field Values

ITEM_SEQUENCE_NUMBER

protected static final String ITEM_SEQUENCE_NUMBER
See Also:
Constant Field Values

ITEM_CONSUMER_ID

protected static final String ITEM_CONSUMER_ID
See Also:
Constant Field Values

handle

protected Long handle

state

protected int state

stateString

protected String stateString

xidString

protected String xidString

sequenceNumber

protected long sequenceNumber

consumerID

protected String consumerID
Constructor Detail

MessageInfo

protected MessageInfo()
Default constructor.


MessageInfo

public MessageInfo(CompositeData cd)
            throws OpenDataException

Creates an instance from a CompositeData represenation.

Parameters:
cd - An open data representation of a MessageInfo instance.
Throws:
OpenDataException - An error occurred while extracting attributes from the CompositeData representation.

MessageInfo

public MessageInfo(long handle,
                   int state,
                   String xidString,
                   long sequenceNumber,
                   String consumerID)

Construct an instance with the specified attributes.

Parameters:
handle - The cursor handle of the message.
state - The state of the message.
xidString - The string representation of the associated Xid
sequenceNumber - The sequence number of the message.
consumerID - Information about the entity consuming the message.
Method Detail

toCompositeData

public CompositeData toCompositeData()
                              throws OpenDataException

Converts the instance to a CompositeData representation.

Returns:
A CompositeData representation of the object.
Throws:
OpenDataException - Thrown when an error occurs while constructing the CompositeData representation.

getHandle

public Long getHandle()

Returns the cursor handle associated with this message.

Returns:
a Long object handle.

setHandle

public void setHandle(Long handle)

Sets the cursor handle attribute.

Parameters:
handle - The handle.

getState

public int getState()

Returns the state of the message at the time the runtime query was performed as a bitmask of state constants defined above.

Returns:
the state bitmask of the message.
See Also:
MessageInfo.STATE_DELAYED, MessageInfo.STATE_EXPIRED, MessageInfo.STATE_ORDERED, MessageInfo.STATE_PAUSED, MessageInfo.STATE_RECEIVE, MessageInfo.STATE_REDELIVERY_COUNT_EXCEEDED, MessageInfo.STATE_SEND, MessageInfo.STATE_TRANSACTION, MessageInfo.STATE_VISIBLE

setState

public void setState(int state)

Sets the state of the message.

Parameters:
state - The state of the message.

getStateString

public String getStateString()

Returns a string representation of the state of the message.

Returns:
the state bitmask in string form.
See Also:
MessageInfo.getState()

getXidString

public String getXidString()

Returns the Xid of the global transaction that the message was associated with at the time the management operation was performed.

Returns:
the Xid in WebLogic JTA Xid toString format.

setXidString

public void setXidString(String xidString)

Sets the Xid attribute.

Parameters:
xidString - An Xid in WebLogic JTA Xid toString format.

getSequenceNumber

public long getSequenceNumber()

Returns the sequence number of the message. The sequence number identifies the message's position in the arrival order for the underlying destination.

Returns:
the message sequence number.

setSequenceNumber

public void setSequenceNumber(long sequenceNumber)

Sets the sequence number attribute.

Parameters:
sequenceNumber - A sequence number.

getConsumerID

public String getConsumerID()

Returns the consumer ID for the message. The consumer ID identifies the consumer of the message at the time the management operation was invoked.

Returns:
Returns the consumerID attribute.

setConsumerID

public void setConsumerID(String consumerID)

Sets the consumer ID attribute.

Parameters:
consumerID - The consumerID to set.

getStateString

public static String getStateString(int state)

Returns the string representation of the specified state bitmask.

Parameters:
state - A state bitmask
Returns:
the state bitmask in string format.

initOpenInfo

protected void initOpenInfo()

readCompositeData

protected void readCompositeData(CompositeData cd)
                          throws OpenDataException
Throws:
OpenDataException

getCompositeDataMap

protected Map getCompositeDataMap()
                           throws OpenDataException
Throws:
OpenDataException

getCompositeType

protected CompositeType getCompositeType()
                                  throws OpenDataException
Throws:
OpenDataException

Copyright 1996, 2014, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.1.3)

Part Number E41849-02