WebLogic Integration


com.bea.b2b.protocol.xocp.messaging
Class XOCPMessage

java.lang.Object
  |
  +--com.bea.b2b.protocol.messaging.MessageBase
        |
        +--com.bea.b2b.protocol.xocp.messaging.XOCPMessage

public class XOCPMessage
extends MessageBase
implements Message

The XOCPMessage class represents an XOCP business message. It holds XOCP-related contexts, including types of system messages.

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

Constructor Summary
XOCPMessage()
          Constructs an XOCPMessage object.
XOCPMessage(java.lang.String dest)
          Constructs an XOCPMessage object with the specified destination.
 
Method Summary
 Conversation getConversation()
          Gets the conversation in which this business message is sent.
 java.lang.String getExpression()
          Gets the c-enabler XPath expression that was specified by the sender of this message.
 QualityOfService getQoS()
          Gets the Quality of Service setting that was specified by the sender of this business message.
 java.lang.String getSender()
          Gets the sender of this business message.
 MessageToken send()
          Sends this business message with a deferred synchronous delivery option.
 MessageToken sendAndWait(long waitTime)
          Sends this business message synchronously and waits until the business message reaches its destination(s).
 void setConversation(Conversation c)
          Sets the conversation in which to send this business message.
 void setExpression(java.lang.String exp)
          Sets the c-enabler XPath expression for this business message.
 void setQoS(QualityOfService qos)
          Sets the Quality of Service for message delivery.
 void setRecipient(java.lang.String recipient)
          Specifies the name of a single trading partner to receive this business message.
 
Methods inherited from class com.bea.b2b.protocol.messaging.MessageBase
addPayloadPart, addPayloadParts, addRecipient, finalizeDeliveryStatus, getConversationId, getConversationType, getCreationTime, getMessageId, getPayloadParts, getRecipients, isBusinessMessage, logOrigin, logReceipt, removeAllPayloadParts, removeAllRecipients, removeRecipient, setToRole
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XOCPMessage

public XOCPMessage()
Constructs an XOCPMessage object.

XOCPMessage

public XOCPMessage(java.lang.String dest)
Constructs an XOCPMessage object with the specified destination.

Parameters:
dest - Destination of the business message.
Method Detail

getExpression

public java.lang.String getExpression()
Gets the c-enabler XPath expression that was specified by the sender of this message.

Returns:
String - Routing expression.

setExpression

public void setExpression(java.lang.String exp)
Sets the c-enabler XPath expression for this business message.

Parameters:
exp - XPath expression. Must comply with XPath syntax and usage rules.

getQoS

public QualityOfService getQoS()
Gets the Quality of Service setting that was specified by the sender of this business message.


setQoS

public void setQoS(QualityOfService qos)
Sets the Quality of Service for message delivery. This method can be used in the c-enabler but not in the c-hub.


getConversation

public Conversation getConversation()
Gets the conversation in which this business message is sent. This method can be used in the c-enabler but not in the c-hub.

Returns:
Conversation - Conversation in which this business message is sent.

setConversation

public void setConversation(Conversation c)
Sets the conversation in which to send this business message. This method can be used in the c-enabler but not in the c-hub.

Parameters:
c - Conversation in which to send this business message.

sendAndWait

public MessageToken sendAndWait(long waitTime)
                         throws MessageDeliveryException
Sends this business message synchronously and waits until the business message reaches its destination(s).

Parameters:
waitTime - Time to wait, in milliseconds. If zero (0) is specified, waits until the message reaches its destination(s). The waitTime of zero (0) is not recommended for production systems as there is always possibilities that messages or acknowledgements can get lost due to link failures. In such cases, applications should try resending messages and take care of duplicate messages.
Returns:
MessageToken - Message token that provides delivery status and other useful information.
Throws:
MessageDeliveryException - If an error occurred while attempting to deliver the business message.

send

public MessageToken send()
                  throws MessageDeliveryException
Sends this business message with a deferred synchronous delivery option. The application can wait on the given message token until the message reaches its destination(s).
Specified by:
send in interface Message

Returns:
MessageToken - Message token that provides delivery status and other information. The application can wait on the message token.
Throws:
MessageDeliveryException - If an error occurred while attempting to deliver the message.

setRecipient

public void setRecipient(java.lang.String recipient)
                  throws ModificationException
Specifies the name of a single trading partner to receive this business message. This method can be used in the c-enabler but not in the c-hub.
Specified by:
setRecipient in interface Message

Parameters:
recipient - Name of the business message recipient.
Overrides:
setRecipient in class MessageBase

getSender

public java.lang.String getSender()
Gets the sender of this business message.

Returns:
sender

WebLogic Integration

WebLogic Integration (WLI)