com.ibm.ws.serialization
Interface SerializationObjectReplacer


public interface SerializationObjectReplacer

Allows replacing non-serializable objects prior to serialization. Typical scenarios are:

In either case, the bundle would provide a replacer to recognize the object and return a serialized form, and would add a resolveObject method to the class of the serialized form class to recreate the original object. Note that the class of the serialized form will typically need to be made visible via DeserializationClassProvider.


Method Summary
 java.lang.Object replaceObject(java.lang.Object object)
          Replaces non-serialization objects prior to serialization.
 

Method Detail

replaceObject

java.lang.Object replaceObject(java.lang.Object object)
Replaces non-serialization objects prior to serialization. If the implementation does not recognize the object then null should be returned. If an object is returned, it must be either Serializable or Externalizable.

Implementations are strongly encouraged to annotate the parameter with Sensitive to avoid tracing user data.

Parameters:
object - the object being serialized
Returns:
the replacement object, or null if no replacement is needed