com.ibm.bpe.api

Class ProcessResponseWrapper

  • java.lang.Object
    • 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:

    • It defers deserialization of the message passed from the process engine to a client until the message is accessed. This allows the client program to set the appropriate class loader.
    • It serves as a container so that the message can be returned together with its custom client settings.
    Since:
    5.1
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT 
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      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
    • 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.
IBM Business Process ManagerTM
Release 8