com.ibm.bpe.api
Class ProcessResponseWrapper

java.lang.Object
  extended by com.ibm.bpe.api.ProcessResponseWrapper
All Implemented Interfaces:
java.io.Serializable

public final class ProcessResponseWrapper
extends java.lang.Object
implements java.io.Serializable

Wraps the output message returned by a microflow and its associated custom client settings.

The ProcessResponseWrapper class servers two major purposes:

Since:
5.1
See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
           
 
Constructor Summary
ProcessResponseWrapper()
          Default constructor needed by deserialization.
ProcessResponseWrapper(java.lang.Object message, CustomClientSettings setting)
          Constructor that stores the passed objects.
 
Method Summary
static ProcessResponseWrapper fromByteArray(byte[] buffer, CustomClientSettings setting)
          Factory method that creates a ProcessResponseWrapper from a byte array and custom client setting.
 CustomClientSettings getClientUISettings()
          Returns the custom client settings associated to the message.
 java.lang.Object getMessage()
          Returns the wrapped object, the message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
See Also:
Constant Field Values
Constructor Detail

ProcessResponseWrapper

public ProcessResponseWrapper()
Default constructor needed by deserialization. Sets the wrapped object to null.


ProcessResponseWrapper

public ProcessResponseWrapper(java.lang.Object message,
                              CustomClientSettings setting)
Constructor that stores the passed objects.

Parameters:
message - The message to be returned. The message must implement java.io.Serializable.
setting - The custom client settings associated with the message.
Method Detail

fromByteArray

public static ProcessResponseWrapper fromByteArray(byte[] buffer,
                                                   CustomClientSettings setting)
Factory method that creates a ProcessResponseWrapper from a byte array and custom client setting. The constructor taking a byte array as parameter is private because it is ambiguous (arrays are also objects).

Parameters:
buffer - The serialized message to wrap.
setting - The custom client settings associated with the message.
Returns:
A ProcessResponseWrapper object.

getMessage

public java.lang.Object getMessage()
                            throws ProcessException
Returns the wrapped object, the message.

If the ProcessResponseWrapper has been serialized, then deserialized and this is the first time the message is accessed, the message is deserialized before it is returned. If the ProcessResponseWrapper has never been serialized, or the message has been accessed before, the message is returned without deserialization.

Returns:
The message contained in the ProcessResponseWrapper object.
Throws:
ProcessException - if an error occurrs during deserialization of the message.

getClientUISettings

public CustomClientSettings getClientUISettings()
Returns the custom client settings associated to the message.

Returns:
The custom client settings.