APIdia Launch Partner
Top Description Methods
sun.rmi.server

public Interface DeserializationChecker

Imports
java.io.ObjectStreamClass, java.lang.reflect.Method

Implementing this interface to have a deserialization control when RMI dispatches a remote request. If an exported object implements this interface, RMI dispatching mechanism will call the method check every time deserialising a remote object for invoking a method of the exported object.
Author
sjiang

Method Summary

Modifier and TypeMethod and Description
public void
check(Method
the method invoked from a remote request.
method
,
ObjectStreamClass
The descriptor of the class of any object deserialised while deserialising the parameter. The first descriptor will be that of the top level object (the concrete class of the parameter itself); Subsequent calls with the same method, paramIndex and callID will correspond to objects contained in the parameter.
descriptor
,
int
an index indicates the position of a parameter in the method. This index will be reused for deserialising all objects contained in the parameter object. For example, the parameter being deserialised is a List, all deserialisation calls for its elements will have same index.
paramIndex
,
int
a unique ID identifying one time method invocation, the same ID is used for deserialization call of all parameters within the method.
callID
)

Will be called to check a descriptor.

public void
checkProxyClass(Method
the method invoked from a remote request.
method
,
String[]
a string table of all interfaces implemented by the proxy to be checked.
ifaces
,
int
an index indicates the position of a parameter in the method. This index will be reused for deserialising all objects contained in the parameter object. For example, the parameter being deserialised is a List, all deserialisation calls for its elements will have same index.
paramIndex
,
int
a unique ID identifying one time method invocation, the same ID is used for deserialization call of all parameters within the method.
callID
)

Will be called to validate a Proxy interfaces from a remote user before loading it.

public default void
end(int
the ID identifying a method invocation.
callID
)

Inform of the completion of parameter deserialisation for a method invocation.

Method Detail

checkback to summary
public void check(Method method, ObjectStreamClass descriptor, int paramIndex, int callID)

Will be called to check a descriptor. This method may be called 2 times, the first time is when a descriptor is read from the stream, the second is just before creating an object described by this descriptor.

Parameters
method:Method

the method invoked from a remote request.

descriptor:ObjectStreamClass

The descriptor of the class of any object deserialised while deserialising the parameter. The first descriptor will be that of the top level object (the concrete class of the parameter itself); Subsequent calls with the same method, paramIndex and callID will correspond to objects contained in the parameter.

paramIndex:int

an index indicates the position of a parameter in the method. This index will be reused for deserialising all objects contained in the parameter object. For example, the parameter being deserialised is a List, all deserialisation calls for its elements will have same index.

callID:int

a unique ID identifying one time method invocation, the same ID is used for deserialization call of all parameters within the method.

checkProxyClassback to summary
public void checkProxyClass(Method method, String[] ifaces, int paramIndex, int callID)

Will be called to validate a Proxy interfaces from a remote user before loading it.

Parameters
method:Method

the method invoked from a remote request.

ifaces:String[]

a string table of all interfaces implemented by the proxy to be checked.

paramIndex:int

an index indicates the position of a parameter in the method. This index will be reused for deserialising all objects contained in the parameter object. For example, the parameter being deserialised is a List, all deserialisation calls for its elements will have same index.

callID:int

a unique ID identifying one time method invocation, the same ID is used for deserialization call of all parameters within the method.

endback to summary
public default void end(int callID)

Inform of the completion of parameter deserialisation for a method invocation. This is useful if the last parameter is a complex object, like a List which elements are complex object too. The default implementation does nothing.

Parameters
callID:int

the ID identifying a method invocation.