WebLogic Integration


com.bea.b2b.protocol.messaging
Interface Message

All Known Implementing Classes:
MessageBase, XOCPMessage, CXMLMessage

public interface Message
extends java.io.Serializable, java.lang.Cloneable

The Message interface contains all of the information required for processing a business message in WebLogic Collaborate, either on the c-hub or on a c-enabler node.

Author:
Copyright © 2000, 2001 BEA Systems, Inc. All Rights Reserved.

Method Summary
 void addPayloadPart(PayloadPart payloadPart)
          Adds a single payload part to this business message.
 void addPayloadParts(PayloadPart[] payloadParts)
          Adds one or more payload parts to this business message.
 CAInstance getCA()
          Get Collaboration Agreement associated with this message.
 java.lang.String getCAId()
          Get global identifier of Collaboration Agreement in which this message is processed.
 java.lang.String getConversationId()
          Gets the conversation ID for the conversation in which this business message is sent.
 ConversationType getConversationType()
          Gets the conversation type of this message.
 long getCreationTime()
          Gets the time when this business message was created.
 PartyInstance getFromParty()
          Get party of associated Collaboration Agreement which sent this message or is supposed to be sending this message.
 java.lang.String getMessageId()
          Returns the unique message ID of this business message.
 PayloadPart[] getPayloadParts()
          Gets all of the payload parts of this business message.
 java.lang.String[] getRecipients()
          Gets a copy of the current list of recipients for this business message.
 PartyInstance getToParty()
          Get party of associated Collaboration Agreement which received this message or is supposed to receive this message.
 boolean isBusinessMessage()
          Determines whether this message is a valid business message (true) or not (false).
 boolean isInReplyToMessageId()
          Check if this message is a response to a message we sent
 void removeAllPayloadParts()
          Removes all payload parts from this business message.
 MessageToken send()
          Sends this business message to the c-hub.
 void setCAId(java.lang.String caId)
          Set Collaboration Agreement global identifier associated with this message.
 void setRecipient(java.lang.String recipient)
          Sets the recipients list of this business message to the single specified trading partner.
 

Method Detail

getMessageId

public java.lang.String getMessageId()
Returns the unique message ID of this business message. This identifier is for the business message received.

The message ID is used to help tracking this business message. It can also be used in crash recovery to help identify duplicate messages that may have occurred during system failure. The message ID is not set until the c-enabler sends this business message.

Returns:
String - Message ID.

getCreationTime

public long getCreationTime()
Gets the time when this business message was created.

Returns:
long - Number of milliseconds since January 1, 1970.

getConversationId

public java.lang.String getConversationId()
Gets the conversation ID for the conversation in which this business message is sent.

Returns:
String - Conversation ID.

getConversationType

public ConversationType getConversationType()
Gets the conversation type of this message.

Returns:
ConversationType - Conversation type.

isBusinessMessage

public boolean isBusinessMessage()
Determines whether this message is a valid business message (true) or not (false). Usage of this method is restricted to the c-hub only.

Returns:
boolean - true if this is a valid business message, or false if it is not.

getRecipients

public java.lang.String[] getRecipients()
Gets a copy of the current list of recipients for this business message. Usage of this method is restricted to the c-hub only.

Returns:
String[] - Message recipients.

setRecipient

public void setRecipient(java.lang.String recipient)
                  throws ModificationException
Sets the recipients list of this business message to the single specified trading partner. Usage of this method is restricted to c-enablers only.

Parameters:
recipient - recipient of the message

getPayloadParts

public PayloadPart[] getPayloadParts()
Gets all of the payload parts of this business message.

Returns:
PayloadPart[] - Payload parts.

addPayloadPart

public void addPayloadPart(PayloadPart payloadPart)
Adds a single payload part to this business message. Usage of this method is restricted to c-enablers only.

Parameters:
payloadPart - Payload part.

addPayloadParts

public void addPayloadParts(PayloadPart[] payloadParts)
Adds one or more payload parts to this business message. Usage of this method is restricted to c-enablers only.

Parameters:
payloadParts - Payload parts.

removeAllPayloadParts

public void removeAllPayloadParts()
Removes all payload parts from this business message. Usage of this method is restricted to c-enablers only.


send

public MessageToken send()
                  throws MessageDeliveryException
Sends this business message to the c-hub. Usage of this method is restricted to c-enablers only.

Returns:
MessageToken - Message token.
Throws:
MessageDeliveryException - If an error occurred during message delivery.

getCA

public CAInstance getCA()
Get Collaboration Agreement associated with this message.


setCAId

public void setCAId(java.lang.String caId)
             throws ModificationException
Set Collaboration Agreement global identifier associated with this message.

Parameters:
caId - global identifier of the Collaboration Agreement
Throws:
ModificationException - If an error occurred during message modification.

getToParty

public PartyInstance getToParty()
Get party of associated Collaboration Agreement which received this message or is supposed to receive this message.


getFromParty

public PartyInstance getFromParty()
Get party of associated Collaboration Agreement which sent this message or is supposed to be sending this message.


getCAId

public java.lang.String getCAId()
Get global identifier of Collaboration Agreement in which this message is processed.


isInReplyToMessageId

public boolean isInReplyToMessageId()
Check if this message is a response to a message we sent


WebLogic Integration

WebLogic Integration (WLI)