public interface ObjectStreamContext
ObjectOutputStream
or ObjectInputStream
instance that implements this interface.
The class of an object that is being serialized or deserialized
can test (in its private
writeObject(ObjectOutputStream)
or
readObject(ObjectInputStream)
method) if the object
stream being used implements this interface. If the stream does
implement this interface, the class can then retrieve context
information relevant to the overall serialization or
deserialization operation by invoking the getObjectStreamContext
method and
inspecting the elements of the returned collection.
The contents of the collection are determined by the
implementation of the object stream. The context information
available from a given element of the collection is determined by
that element's type.
Examples of types that a context object might implement include
ClientHost
and
ClientSubject
.
Modifier and Type | Method and Description |
---|---|
Collection |
getObjectStreamContext()
Returns this object stream's collection of context information
objects.
|
Collection getObjectStreamContext()
The context information available from a given element of the collection is determined by that element's type. The order of the elements is insignificant. The collection may be empty.
The caller of this method cannot assume that the returned collection is modifiable.