public class DynamicClassLoader extends java.lang.Object implements Service
ClassMananger
processes will be spawned and send/receive filters created. To support
dynamic class loading over a given channel, plug the TX filter into the sending end and the RX filter
into the receiving end. The channel can then be used normally.Modifier and Type | Class and Description |
---|---|
class |
DynamicClassLoader.DynamicClassLoaderUserObject
User interface to obtain the TX and RX filters from the service once it has been started.
|
Modifier and Type | Field and Description |
---|---|
private DeserializeChannelFilter |
channelRxFilter
The RX filter created when the service started, returned by
getChannelRxFilter . |
private DataSerializationFilter |
channelTxFilter
The TX filter created when the service started, returned by
getChannelTxFilter . |
private ClassManager |
cm
The class manager process started by the service.
|
static java.lang.String |
name
Default service name.
|
private static Filter |
nonDynamicClassLoadingRxFilter
The alternative RX filter that does not support dynamic class loading, returned by
getNonDynamicClassLoadingRxFilter . |
private boolean |
running
Stores the current state of the service.
|
Constructor and Description |
---|
DynamicClassLoader() |
Modifier and Type | Method and Description |
---|---|
Filter |
getChannelRxFilter()
Returns the RX filter to be used at the receiving end of a channel if dynamic class loading is to
be supported over that channel.
|
Filter |
getChannelTxFilter()
Returns the TX filter to be used at the sending end of a channel if dynamic class loading is to
be supported over that channel.
|
static Filter |
getNonDynamicClassLoadingRxFilter()
An alternative RX filter that does not support dynamic class loading but will properly
unmarshal objects wrapped up by a TX filter.
|
ServiceUserObject |
getUserObject()
Returns the service user object.
|
boolean |
init(ServiceSettings settings)
Initializes the dynamic loader service.
|
boolean |
isRunning()
Returns true iff the service is running.
|
boolean |
start()
Starts the dynamic loader service by spawning
ClassManager and JFTP
processes. |
boolean |
stop()
Stops the dynamic loader service.
|
private boolean running
private DataSerializationFilter channelTxFilter
getChannelTxFilter
.private DeserializeChannelFilter channelRxFilter
getChannelRxFilter
.private ClassManager cm
public static final java.lang.String name
private static Filter nonDynamicClassLoadingRxFilter
getNonDynamicClassLoadingRxFilter
.public boolean start()
ClassManager
and JFTP
processes.public boolean stop()
public boolean init(ServiceSettings settings)
public boolean isRunning()
public ServiceUserObject getUserObject() throws java.lang.SecurityException
getUserObject
in interface Service
ServiceUserObject
.java.lang.SecurityException
- if the calling Thread does not have
access to the object.public Filter getChannelTxFilter()
public Filter getChannelRxFilter()
public static Filter getNonDynamicClassLoadingRxFilter()