WebLogic Integration


com.bea.b2b.protocol.messaging
Class MessageBase

java.lang.Object
  |
  +--com.bea.b2b.protocol.messaging.MessageBase
Direct Known Subclasses:
CXMLMessage, XOCPMessage

public abstract class MessageBase
extends java.lang.Object
implements Message

The MessageBase class represents all the information required for processing a business message by the c-hub. It contains implementations that are common to most business protocols.

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

Method Summary
 void addPayloadPart(PayloadPart payloadPart)
          Adds a single payload part to this business message.
 void addPayloadParts(PayloadPart[] payloadParts)
          Adds multiple payload parts to this business message.
 void addRecipient(java.lang.String rec)
          Adds a recipient to the recipients list of this business message.
protected  void finalizeDeliveryStatus()
           
 java.lang.String getConversationId()
          Returns the conversation ID for the conversation in which this business message is sent.
 ConversationType getConversationType()
          Returns the conversation type of this business message.
 long getCreationTime()
          Gets the time when this business message was created.
 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 recipients list for this business message.
 boolean isBusinessMessage()
          Determines whether this message is a valid business message (true) or not (false).
 void logOrigin()
          Logs message to secure audit log via the AuditLogProvider interface.
 void logReceipt()
          Logs message to secure audit log via the AuditLogProvider interface.
 void removeAllPayloadParts()
          Removes all payload parts from this business message.
 void removeAllRecipients()
          Removes all recipients from the recipients list of this business message.
 boolean removeRecipient(java.lang.String rec)
          Removes the specified recipient from the recipients list of this business message.
 void setRecipient(java.lang.String recipient)
          Sets the recipient trading partner for this business message.
 void setToRole(java.lang.String tRole)
          Sets the to-role for the recipients of this business message.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getMessageId

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

The message ID is used to help tracking this business message. It can also be used during crash recovery to help identify duplicate messages.

The message ID is not set until this business message is sent from the c-enabler.

Specified by:
getMessageId in interface Message

Returns:
String - Message ID.

getCreationTime

public long getCreationTime()
Gets the time when this business message was created.
Specified by:
getCreationTime in interface Message

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

getConversationId

public java.lang.String getConversationId()
Returns the conversation ID for the conversation in which this business message is sent.
Specified by:
getConversationId in interface Message

Returns:
String - Conversation ID.

getConversationType

public ConversationType getConversationType()
Returns the conversation type of this business message.
Specified by:
getConversationType in interface Message

Returns:
ConversationType - Conversation type.

setToRole

public void setToRole(java.lang.String tRole)
Sets the to-role for the recipients of this business message.

This method can be used on the c-enabler but not on the c-hub.

Specified by:
setToRole in interface Message

Parameters:
tRole - The to-role of recipient trading partners.

isBusinessMessage

public boolean isBusinessMessage()
Determines whether this message is a valid business message (true) or not (false).

This method can be used on the c-hub but not the c-enabler.

Specified by:
isBusinessMessage in interface Message

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

addRecipient

public void addRecipient(java.lang.String rec)
                  throws ModificationException
Adds a recipient to the recipients list of this business message. Duplicate recipients are removed automatically. All recipients are validated later when the business message is about to be queued for delivery.

This method can be used on the c-hub but not the c-enabler.

Specified by:
addRecipient in interface Message

Throws:
ModificationException - If an error occurred during message modification.

removeAllRecipients

public void removeAllRecipients()
                         throws ModificationException
Removes all recipients from the recipients list of this business message.

This method can be used on the c-hub but not the c-enabler.

Specified by:
removeAllRecipients in interface Message

Throws:
ModificationException - If an error occurred during message modification.

removeRecipient

public boolean removeRecipient(java.lang.String rec)
                        throws ModificationException
Removes the specified recipient from the recipients list of this business message.

This method can be used on the c-hub but not the c-enabler.

Specified by:
removeRecipient in interface Message

Returns:
boolean - true if the specified recipient existed and was removed, or false if the specified recipient did not exist in the recipient list.

getRecipients

public java.lang.String[] getRecipients()
Gets a copy of the current recipients list for this business message.

This method can be used on the c-hub but not the c-enabler.

Specified by:
getRecipients in interface Message

Returns:
String[] - Message recipients.

setRecipient

public void setRecipient(java.lang.String recipient)
                  throws ModificationException
Sets the recipient trading partner for this business message.

This method can be used on the c-enabler but not the c-hub.

Specified by:
setRecipient in interface Message

Parameters:
recipient - recipient of the message

getPayloadParts

public PayloadPart[] getPayloadParts()
Gets all of the payload parts of this business message.
Specified by:
getPayloadParts in interface Message

Returns:
PayloadPart[] - Payload parts.

addPayloadPart

public void addPayloadPart(PayloadPart payloadPart)
Adds a single payload part to this business message.

This method can be used on the c-enabler but not the c-hub.

Specified by:
addPayloadPart in interface Message

Parameters:
payloadPart - Payload part.

addPayloadParts

public void addPayloadParts(PayloadPart[] payloadParts)
Adds multiple payload parts to this business message.

This method can be used on the c-enabler but not the c-hub.

Specified by:
addPayloadParts in interface Message

Parameters:
payloadParts - Payload parts.

removeAllPayloadParts

public void removeAllPayloadParts()
Removes all payload parts from this business message.

This method can be used on the c-enabler but not the c-hub.

Specified by:
removeAllPayloadParts in interface Message


finalizeDeliveryStatus

protected void finalizeDeliveryStatus()
                               throws com.bea.b2b.protocol.ProtocolException


logOrigin

public void logOrigin()
Logs message to secure audit log via the AuditLogProvider interface. This method is used by all the protocol implementations to log messages


logReceipt

public void logReceipt()
Logs message to secure audit log via the AuditLogProvider interface. This method is used by all the protocol implementations to log messages


WebLogic Integration

WebLogic Integration (WLI)