class DeserializeChannelFilter extends java.lang.Object implements Filter
Message objects from SerializedMessage objects.
Dynamic class loading can be enabled by using the constructor which takes a ClassManager.
If dynamic class loading is enabled and a DynamicClassLoaderMessage is filtered, the ClassManager object is supplied to the Message object and the underlying message extracted.
Any classes that need loading from the remote Node are requested and loaded as necessary.| Modifier and Type | Field and Description |
|---|---|
private ClassManager |
cm
The class manger to use for classes dynamically received.
|
private boolean |
dynamic
Set to true if dynamic class loading is enabled.
|
| Constructor and Description |
|---|
DeserializeChannelFilter()
Constructs a new
DeserializeChannelFilter with dynamic loading disabled. |
DeserializeChannelFilter(ClassManager cm)
Constructs a new
DeserializeChannelFilter with a reference to a class manager. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
filter(java.lang.Object object)
This method takes an object and substitutes it for another object based upon the following rules:
If the object is an instance of the
DynamicClassLoaderMessage class and dynamic class loading is enabled,
then the filter will return the object returned by the supplied object's get method. |
private ClassManager cm
private boolean dynamic
DeserializeChannelFilter(ClassManager cm)
DeserializeChannelFilter with a reference to a class manager.cm - the class manager to use for received classes.DeserializeChannelFilter()
DeserializeChannelFilter with dynamic loading disabled.public java.lang.Object filter(java.lang.Object object)
DynamicClassLoaderMessage class and dynamic class loading is enabled,
then the filter will return the object returned by the supplied object's get method. A ClassManager will be
supplied to the method.
If the object is an instance of the SerializedMessage class then the object's get
method will be called. The message being held by the SerializedMessage will be deserialized
but classes will not be dynamically loaded.
If the object is not a SerializedMessage object, then the object itself will be returned without
modification.