java.io
Class ObjectInputStream.ValidationList

java.lang.Object
  extended byjava.io.ObjectInputStream.ValidationList
Enclosing class:
ObjectInputStream

private static class ObjectInputStream.ValidationList
extends Object

Prioritized list of callbacks to be performed once object graph has been completely deserialized.


Nested Class Summary
private static class ObjectInputStream.ValidationList.Callback
           
 
Field Summary
private  ObjectInputStream.ValidationList.Callback list
          linked list of callbacks
 
Constructor Summary
(package private) ObjectInputStream.ValidationList()
          Creates new (empty) ValidationList.
 
Method Summary
 void clear()
          Resets the callback list to its initial (empty) state.
(package private)  void doCallbacks()
          Invokes all registered callbacks and clears the callback list.
(package private)  void register(ObjectInputValidation obj, int priority)
          Registers callback.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

list

private ObjectInputStream.ValidationList.Callback list
linked list of callbacks

Constructor Detail

ObjectInputStream.ValidationList

ObjectInputStream.ValidationList()
Creates new (empty) ValidationList.

Method Detail

register

void register(ObjectInputValidation obj,
              int priority)
        throws InvalidObjectException
Registers callback. Throws InvalidObjectException if callback object is null.

Throws:
InvalidObjectException

doCallbacks

void doCallbacks()
           throws InvalidObjectException
Invokes all registered callbacks and clears the callback list. Callbacks with higher priorities are called first; those with equal priorities may be called in any order. If any of the callbacks throws an InvalidObjectException, the callback process is terminated and the exception propagated upwards.

Throws:
InvalidObjectException

clear

public void clear()
Resets the callback list to its initial (empty) state.