com.ibm.task.api

Class ClientObjectWrapper

  1. java.lang.Object
  2. extended bycom.ibm.task.api.ClientObjectWrapper
All implemented interfaces:
java.io.Serializable, java.lang.Cloneable

  1. public final class ClientObjectWrapper
  2. extends java.lang.Object
  3. implements java.io.Serializable, java.lang.Cloneable
Wraps messages passed between the caller and the Human Task Manager.

When the Human Task Manager is accessed through its EJB interface, then

The ClientObjectWrapper wraps messages and thus defers their deserialization until the wrapped message is accessed. This allows the Human Task Manager to set the appropriate class loader.
Since:
5.1
See Also:
Serialized Form

Field Summary

Modifier and Type Field and Description
  1. static
  2. java.lang.String
COPYRIGHT

Constructor Summary

Constructor and Description
ClientObjectWrapper()
Default constructor needed by deserialization.
ClientObjectWrapper(java.lang.Object object)
Constructor that stores the passed object, the message.

Method Summary

Modifier and Type Method and Description
  1. java.lang.Object
clone()
Creates and returns a copy of this object.
  1. static
  2. ClientObjectWrapper
fromByteArray(byte[] buffer,boolean unwrapSimpleTypes)
Factory method that creates a ClientObjectWrapper from a byte array.
  1. java.lang.Object
getObject()
Returns the wrapped object, the message.
  1. java.lang.Object
getObject(boolean unwrapSimpleTypes)
Returns the wrapped object, the message.
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

  1. public static final java.lang.String COPYRIGHT
See Also:

Constructor Detail

ClientObjectWrapper

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

ClientObjectWrapper

  1. public ClientObjectWrapper(java.lang.Object object)
Constructor that stores the passed object, the message.
Parameters:
object - The object to wrap. When the ClientObjectWrapper object is used as an EJB parameter or as an EJB return value, then object must implement java.io.Serializable.

Method Detail

fromByteArray

  1. public static ClientObjectWrapper fromByteArray( byte[] buffer,
  2. boolean unwrapSimpleTypes)
Factory method that creates a ClientObjectWrapper from a byte array.
Parameters:
buffer - The serialized object to wrap.
unwrapSimpleTypes - true in simple type wrapper used by the REST API will be unwrapped; false otherwise.
Returns:
A ClientObjectWrapper object.

getObject

  1. public java.lang.Object getObject( )
  2. throws TaskException
Returns the wrapped object, the message.

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

Returns:
The wrapped object.
Throws:
TaskException - if an error occurrs during deserialization of the object.

getObject

  1. public java.lang.Object getObject( boolean unwrapSimpleTypes)
  2. throws TaskException
Returns the wrapped object, the message.

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

Parameters:
unwrapSimpleTypes - true if the DataObject will be unwrapped in case it's a simple type; false otherwise.
Returns:
The wrapped object.
Throws:
TaskException - if an error occurrs during deserialization of the object.

clone

  1. public java.lang.Object clone()
  2. throws java.lang.CloneNotSupportedException
Creates and returns a copy of this object.

The meaning of "copy" depends on the class of the object. Generally, for any object x, the expression:

 x.clone() != x
is true, and the expression:
 x.clone().getClass() == x.getClass()
is true.

Overrides:
clone in class java.lang.Object
Returns:
A clone of this object.
Throws:
java.lang.CloneNotSupportedException - if the object's class does not support the Cloneable interface.
See Also: