APIdia Launch Partner
Top Description Fields Constructors Methods
java.io

pack-priv final Class SerialCallbackContext

extends Object
Class Inheritance

Context during upcalls from object stream to class-defined readObject/writeObject methods. Holds object currently being deserialized and descriptor for current class.

This context keeps track of the thread it was constructed on, and allows only a single call of defaultReadObject, readFields, defaultWriteObject or writeFields which must be invoked on the same thread before the class's readObject/writeObject method has returned. If not set to the current thread, the getObj method throws NotActiveException.

Field Summary

Modifier and TypeField and Description
private final ObjectStreamClass
private final Object
private Thread
thread

Thread this context is in use by.

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv void
pack-priv void
pack-priv ObjectStreamClass
pack-priv Object
pack-priv void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

descback to summary
private final ObjectStreamClass desc
objback to summary
private final Object obj
threadback to summary
private Thread thread

Thread this context is in use by. As this only works in one thread, we do not need to worry about thread-safety.

Constructor Detail

SerialCallbackContextback to summary
pack-priv SerialCallbackContext(Object obj, ObjectStreamClass desc)

Method Detail

checkback to summary
pack-priv void check() throws NotActiveException
checkAndSetUsedback to summary
pack-priv void checkAndSetUsed() throws NotActiveException
getDescback to summary
pack-priv ObjectStreamClass getDesc()
getObjback to summary
pack-priv Object getObj() throws NotActiveException
setUsedback to summary
pack-priv void setUsed()