com.ibm.bpe.api
Class ClientObjectWrapper
- java.lang.Object
com.ibm.bpe.api.ClientObjectWrapper
- public final class ClientObjectWrapper
- extends java.lang.Object
- implements java.io.Serializable, java.lang.Cloneable
When the process engine is accessed through its EJB interface:
- Invocation parameters are automatically deserialized by the application server.
- Messages and variables are deserialized before the process engine sets the appropriate class loader.
ClientObjectWrapper
class
defers deserialization until the wrapped message or variable is accessed.
This allows the process engine to set the appropriate class loader.
Field Summary
Modifier and Type | Field and Description |
---|---|
|
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 |
---|---|
|
clone()
Creates and returns a copy of this object.
|
|
fromByteArray(byte[] buffer,boolean unwrapSimpleTypes)
Factory method that creates a ClientObjectWrapper from a byte array.
|
|
getObject()
Returns the wrapped object, the message.
|
|
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
COPYRIGHT
- public static final java.lang.String COPYRIGHT
Constructor Detail
ClientObjectWrapper
- public ClientObjectWrapper()
ClientObjectWrapper
- public ClientObjectWrapper(java.lang.Object object)
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
- public static ClientObjectWrapper fromByteArray( byte[] buffer,
- boolean unwrapSimpleTypes)
buffer
- The serialized object to wrap. unwrapSimpleTypes
- true
in simple type wrapper used by the REST API will be
unwrapped; false
otherwise. getObject
- public java.lang.Object getObject( )
- throws ProcessException
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.
ProcessException
- if an error occurrs during deserialization of the object. getObject
- public java.lang.Object getObject( boolean unwrapSimpleTypes)
- throws ProcessException
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.
unwrapSimpleTypes
- true
if the DataObject will be unwrapped in case it's a simple type;
false
otherwise. ProcessException
- if an error occurrs during deserialization of the object. clone
- public java.lang.Object clone()
- throws java.lang.CloneNotSupportedException
The meaning of "copy" depends on the class of the object.
Generally, for any object x
, the expression:
is true, and the expression:x.clone() != x
isx.clone().getClass() == x.getClass()
true
.
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- if the object's class does not support the Cloneable
interface.
null
.