com.bea.b2b.protocol.messaging
Class MessageEnvelope

java.lang.Object
  |
  +--com.bea.b2b.protocol.messaging.MessageEnvelope

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

The MessageEnvelope class represents a message envelope, which consists of a business message and associated meta-information.

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

Method Summary
 boolean continueProcessing()
          Determines whether the processing of the logic plug-in chain would continue (true) or not (false) if an exception were thrown during execution of logic plug-ins in the chain.
 void continueProcessing(boolean contProc)
          Specifies whether the processing of the logic plug-in chain should continue (true) or not (false) if an exception were thrown during execution of logic plug-ins in the chain.
 int getContentLength()
          Gets the length of this business message, in bytes.
 java.lang.String getContentType()
          Gets the MIME message type of this business message.
 java.lang.String getCSpace()
          Gets the name of the c-space in which this business message is exchanged.
 java.lang.String getInboundUrl()
          Gets the URL of the c-space/business-protocol combination that the c-enabler node used to send this business message to the c-hub.
 java.io.InputStream getInputStream()
          Gets an InputStream with which to read the business message.
 Message getMessage()
          Gets the business message contained in this message envelope.
 java.lang.String getProtocolName()
          Gets the name of the business protocol associated with this business message.
 java.lang.String getRecipient()
          Gets the name of the recipient of this business message.
 java.lang.String getSender()
          Gets the name of the trading partner who sent this message.
 java.lang.String getSenderUrl()
          Gets the URL of the c-enabler node that sent this business message.
 int getStatusCode()
          Gets the status code associated with the processing of this business message.
 boolean isSecure()
          Determines whether the transport mechanism used in conjunction with this business message is secure (true) or not (false).
 void setRecipient(java.lang.String recipient)
          Sets the recipient list of the business message in this message envelope to the single specified trading partner.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getContentType

public java.lang.String getContentType()
Gets the MIME message type of this business message.


getContentLength

public int getContentLength()
Gets the length of this business message, in bytes.


getStatusCode

public int getStatusCode()
Gets the status code associated with the processing of this business message. The significance of the returned value depends on the underlying transport protocol used. By default, it returns zero (0), which has no specific significance.


getInputStream

public java.io.InputStream getInputStream()
Gets an InputStream with which to read the business message.

Returns:
InputStream - Input stream.

getMessage

public Message getMessage()
Gets the business message contained in this message envelope. The business message will be specific to the business protocol used to process it. The Message interface provides generic information for any business protocol.

Returns:
Message - Message.

getProtocolName

public java.lang.String getProtocolName()
Gets the name of the business protocol associated with this business message. The business protocol name is defined in the c-hub repository.

Returns:
String Business protocol name being used for this message.

getInboundUrl

public java.lang.String getInboundUrl()
Gets the URL of the c-space/business-protocol combination that the c-enabler node used to send this business message to the c-hub. The c-space/business-protocol combination is defined in the c-hub repository.

Returns:
String Target c-space/business protocol URL on the c-hub.

getSenderUrl

public java.lang.String getSenderUrl()
Gets the URL of the c-enabler node that sent this business message.

Returns:
String C-Enabler URL of the sender of this business message.

getSender

public java.lang.String getSender()
Gets the name of the trading partner who sent this message.

Returns:
String - Trading partner name.

getCSpace

public java.lang.String getCSpace()
Gets the name of the c-space in which this business message is exchanged.

Returns:
String - C-space name.

isSecure

public boolean isSecure()
Determines whether the transport mechanism used in conjunction with this business message is secure (true) or not (false). For example, Secure Sockets Layer (SSL) is a secure transport protocol.

This applies to the transport on which the business message was received, not the transport that will be used to send the business message.

Returns:
boolean - true if secure transport is being used (such as SSL), or false if not.

setRecipient

public void setRecipient(java.lang.String recipient)
                  throws ModificationException
Sets the recipient list of the business message in this message envelope to the single specified trading partner.

Throws:
ModificationException - If an error occurred when modifying the recipient list.

getRecipient

public java.lang.String getRecipient()
Gets the name of the recipient of this business message.

Returns:
String - Recipient name.

continueProcessing

public boolean continueProcessing()
Determines whether the processing of the logic plug-in chain would continue (true) or not (false) if an exception were thrown during execution of logic plug-ins in the chain.

Normally, all of the logic plug-ins are independent, and the failure of one should not stop the processing by others. In certain cases, however, the failure might be so severe that it is not reasonable to continue processing. All requests start with a default value of true.

If false, then processing stops at that point in the chain.

Returns:
boolean - true if processing would continue, or false if not.

continueProcessing

public void continueProcessing(boolean contProc)
Specifies whether the processing of the logic plug-in chain should continue (true) or not (false) if an exception were thrown during execution of logic plug-ins in the chain.

Normally, all of the logic plug-ins are independent and the failure of one should not stop processing by others. In some cases, however, the failure might be so severe that it is not reasonable to continue processing.

All requests start with a default value of true. If set to false, then processing stops at that point in the chain.

Parameters:
contProc - true to continue processing, or false to stop processing.