WebLogic Integration


com.bea.b2b.protocol.messaging
Class MessageToken

java.lang.Object
  |
  +--com.bea.b2b.protocol.messaging.MessageToken
Direct Known Subclasses:
CXMLMessageToken, XOCPMessageToken

public class MessageToken
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

The MessageToken class represents a message token that is returned to an application when it sends a business message to the c-hub. The application can use the MessageToken object to check the delivery status of the business message.

If the business message was sent using deferred synchronous delivery, then the application can wait on the message token.

If the message was sent using synchronous delivery, however, then the application cannot wait on the message token.

Author:
Copyright © 2000, 2001 BEA Systems, Inc. All Rights Reserved.
See Also:
Serialized Form

Field Summary
protected static com.bea.eci.logging.LogOutputStream log
           
protected  com.bea.b2b.protocol.messaging.MessageTokenState mts
           
 
Method Summary
 DeliveryStatus[] getAllDeliveryStatus()
          Gets the DeliveryStatus of all of the recipients of the business message associated with this token.
 java.util.Date getArrivalTime()
          Gets the time when the business message associated with this message token arrived in the c-hub or at the receiving c-enabler.
 java.lang.String getConversationId()
          Gets the conversation ID of the conversation in which the business message associated with this token is sent.
 DeliveryStatus getDeliveryStatus()
          Gets the DeliveryStatus from a single recipient of the business message associated with this token.
 int getDestinations()
          Gets the number of destinations to which the business message associated with this token was sent.
 java.lang.Throwable getException()
          Gets any exception thrown during processing of the business message associated with this message token.
 java.lang.String getMessageId()
          Gets the message ID of the business message associated with this message token.
 java.util.Date getSentTime()
          Gets the time when the business message associated with this message token was sent.
 boolean isReleased()
          Determines whether the message token released the thread (true) or not (false) due to such errors as network link failures between the c-enabler and the c-hub.
 void lock(com.bea.b2b.persistence.PersistenceOp op)
           
 long timeTaken()
          Gets the time taken, in milliseconds, to deliver the business message associated with this token to all of its destinations.
 void unlock(com.bea.b2b.persistence.PersistenceOp op)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected static com.bea.eci.logging.LogOutputStream log

mts

protected com.bea.b2b.protocol.messaging.MessageTokenState mts
Method Detail

lock

public void lock(com.bea.b2b.persistence.PersistenceOp op)
          throws com.bea.b2b.persistence.PersistenceException


unlock

public void unlock(com.bea.b2b.persistence.PersistenceOp op)
            throws com.bea.b2b.persistence.PersistenceException


getSentTime

public java.util.Date getSentTime()
Gets the time when the business message associated with this message token was sent.

Returns:
Date - Time when the business message was sent.

getArrivalTime

public java.util.Date getArrivalTime()
Gets the time when the business message associated with this message token arrived in the c-hub or at the receiving c-enabler.

Returns:
Date - Time the business message arrived.

getConversationId

public java.lang.String getConversationId()
Gets the conversation ID of the conversation in which the business message associated with this token is sent.

Returns:
String - Conversation ID.

getMessageId

public java.lang.String getMessageId()
Gets the message ID of the business message associated with this message token.

Returns:
String - Message ID.

getException

public java.lang.Throwable getException()
Gets any exception thrown during processing of the business message associated with this message token.


timeTaken

public long timeTaken()
Gets the time taken, in milliseconds, to deliver the business message associated with this token to all of its destinations.

Returns:
long - Time taken, in milliseconds, or -1 if the result is not known.

getAllDeliveryStatus

public DeliveryStatus[] getAllDeliveryStatus()
Gets the DeliveryStatus of all of the recipients of the business message associated with this token.

Returns:
DeliveryStatus[] - Delivery status from all message recipients.

getDeliveryStatus

public DeliveryStatus getDeliveryStatus()
Gets the DeliveryStatus from a single recipient of the business message associated with this token. Use this method only if the business message was sent to one recipient.

Returns:
DeliveryStatus[] - Delivery status from one message recipient.

getDestinations

public int getDestinations()
Gets the number of destinations to which the business message associated with this token was sent.

Returns:
int - Number of message destinations.

isReleased

public boolean isReleased()
Determines whether the message token released the thread (true) or not (false) due to such errors as network link failures between the c-enabler and the c-hub.


WebLogic Integration

WebLogic Integration (WLI)