com.ibm.ws.serialization
Interface SerializationObjectReplacer
- public interface SerializationObjectReplacer
- A bundle does not want to allow its object to be serialized arbitrarily by user code (e.g., because the object itself contains references to other objects that aren't visible to that bundle). In this case, the bundle would not mark its objects Serializable to disallow serialization.
- A bundle wants to allow serialization of a known object from another bundle, which normally does not allow serialization of its objects.
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
Modifier and Type | Method and Description |
---|---|
|
replaceObject(java.lang.Object object)
Replaces non-serialization objects prior to serialization.
|
Method Detail
replaceObject
- java.lang.Object replaceObject( java.lang.Object object)
Parameters:
object
- the object being serialized Returns:
the replacement object, or null if no replacement is needed
Implementations are strongly encouraged to annotate the parameter with
Sensitive
to avoid tracing user data.