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.
| Modifier and Type | Field and Description |
|---|---|
| private final ObjectStreamClass | |
| private final Object | |
| private Thread | thread
Thread this context is in use by. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| pack-priv void | |
| pack-priv ObjectStreamClass | |
| pack-priv Object | |
| pack-priv void |
| desc | back to summary |
|---|---|
| private final ObjectStreamClass desc | |
| obj | back to summary |
|---|---|
| private final Object obj | |
| thread | back 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. | |
| SerialCallbackContext | back to summary |
|---|---|
| pack-priv SerialCallbackContext(Object obj, ObjectStreamClass desc) | |
| check | back to summary |
|---|---|
| pack-priv void check() throws NotActiveException | |
| checkAndSetUsed | back to summary |
|---|---|
| pack-priv void checkAndSetUsed() throws NotActiveException | |
| getDesc | back to summary |
|---|---|
| pack-priv ObjectStreamClass getDesc() | |
| getObj | back to summary |
|---|---|
| pack-priv Object getObj() throws NotActiveException | |
| setUsed | back to summary |
|---|---|
| pack-priv void setUsed() | |