Package org.jcsp.net.dynamic
Class DynamicClassLoader
java.lang.Object
org.jcsp.net.dynamic.DynamicClassLoader
- All Implemented Interfaces:
Service
A service implementation for supporting dynamic class transfer at a node. When started, JFTP server
and
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.- Author:
- Quickstone Technologies Limited
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
User interface to obtain the TX and RX filters from the service once it has been started. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the RX filter to be used at the receiving end of a channel if dynamic class loading is to be supported over that channel.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
An alternative RX filter that does not support dynamic class loading but will properly unmarshal objects wrapped up by a TX filter.Returns the service user object.boolean
init
(ServiceSettings settings) Initializes the dynamic loader service.boolean
Returns true iff the service is running.boolean
start()
Starts the dynamic loader service by spawningClassManager
andJFTP
processes.boolean
stop()
Stops the dynamic loader service.
-
Field Details
-
name
Default service name.- See Also:
-
-
Constructor Details
-
DynamicClassLoader
public DynamicClassLoader()
-
-
Method Details
-
start
public boolean start()Starts the dynamic loader service by spawningClassManager
andJFTP
processes. -
stop
public boolean stop()Stops the dynamic loader service. -
init
Initializes the dynamic loader service. -
isRunning
public boolean isRunning()Returns true iff the service is running. -
getUserObject
Returns the service user object.- Specified by:
getUserObject
in interfaceService
- Returns:
- a
ServiceUserObject
. - Throws:
SecurityException
- if the calling Thread does not have access to the object.
-
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. If there is a TX filter at the sending end, there must be a RX filter at the receiving end. -
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. The filter returned is safe to use if there is no TX filter at the sending end. -
getNonDynamicClassLoadingRxFilter
An alternative RX filter that does not support dynamic class loading but will properly unmarshal objects wrapped up by a TX filter.
-