WebLogic Integration


com.bea.b2b.protocol.messaging
Class MessageEnvelope

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

public class MessageEnvelope
extends com.bea.b2b.persistence.StateBase
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, 2001 BEA Systems, Inc. All Rights Reserved.
See Also:
Serialized Form

Method Summary
 java.lang.String _getName()
           
 void _insert()
           
 void _postCommit(java.util.Vector list)
           
 void _rollback(java.util.Vector list)
           
 void _write(com.bea.b2b.persistence.WLCConnection connection, boolean autoCommit)
           
 void closeStream(java.io.InputStream is)
          Closes the specified input stream, usually obtained by getInputStream() on this class.
 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.
 void delete()
           
 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.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 getRecipient()
          Gets the name of the recipient of 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).
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

delete

public void delete()
            throws com.bea.b2b.persistence.PersistenceException


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. It is ESSENTIAL that you close the stream as you would any other stream. If you wish, you may use the closeStream() method of MessageEnvelope to avoid having to deal with an extra IOException. Also, since you do not necessarily know the underlying type of inputstream, you should not call reset() without being prepared to catch the usual IOException if "mark" is not supported.

Returns:
InputStream - Input stream.

closeStream

public void closeStream(java.io.InputStream is)
Closes the specified input stream, usually obtained by getInputStream() on this class. It simply does a close, except it checks for a null argument, and traps/swallows any IOExceptions. This is simply a convenience method since exceptions on closing a stream are usually ignorable.


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.

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.

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.

_getName

public java.lang.String _getName()

Overrides:
_getName in class com.bea.b2b.persistence.StateBase

_insert

public void _insert()
             throws com.bea.b2b.persistence.PersistenceException

Overrides:
_insert in class com.bea.b2b.persistence.StateBase

_write

public void _write(com.bea.b2b.persistence.WLCConnection connection,
                   boolean autoCommit)
            throws com.bea.b2b.persistence.PersistenceException

Overrides:
_write in class com.bea.b2b.persistence.StateBase

_postCommit

public void _postCommit(java.util.Vector list)
                 throws com.bea.b2b.persistence.PersistenceException

Overrides:
_postCommit in class com.bea.b2b.persistence.StateBase

_rollback

public void _rollback(java.util.Vector list)
               throws com.bea.b2b.persistence.PersistenceException

Overrides:
_rollback in class com.bea.b2b.persistence.StateBase

WebLogic Integration

WebLogic Integration (WLI)