ObjectInputStream.registerValidation

ObjectInputStream.registerValidation

Class Overview | Class Members | This Package | All Packages

Syntax
public synchronized void registerValidation( ObjectInputValidation obj, int prio ) throws NotActiveException, InvalidObjectException
Parameters
obj
the object to receive the validation callback.
prio
controls the order of callbacks;zero is a good default. Use higher numbers to be called back earlier, lower numbers for later callbacks. Within a priority, callbacks are processed in no particular order.
Description
Register an object to be validated before the graph is returned. While similar to resolveObject these validations are called after the entire graph has been reconstituted. Typically, a readObject method will register the object with the stream so that when all of the objects are restored a final set of validations can be performed.

Exceptions
NotActiveException The stream is not currently reading objects so it is invalid to register a callback.
Exceptions
InvalidObjectException The validation object is null.