CSP for Java
(JCSP) 1.1-rc4

org.jcsp.net.dynamic
Class DynamicClassLoader

java.lang.Object
  extended by org.jcsp.net.dynamic.DynamicClassLoader
All Implemented Interfaces:
Service

public class DynamicClassLoader
extends Object
implements 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
 class DynamicClassLoader.DynamicClassLoaderUserObject
          User interface to obtain the TX and RX filters from the service once it has been started.
 
Field Summary
static String name
          Default service name.
 
Constructor Summary
DynamicClassLoader()
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

public static final String name
Default service name.

See Also:
Constant Field Values
Constructor Detail

DynamicClassLoader

public DynamicClassLoader()
Method Detail

start

public boolean start()
Starts the dynamic loader service by spawning ClassManager and JFTP processes.

Specified by:
start in interface Service
Returns:
true if the service started successfully.

stop

public boolean stop()
Stops the dynamic loader service.

Specified by:
stop in interface Service
Returns:
true iff the service has successfully stopped.

init

public boolean init(ServiceSettings settings)
Initializes the dynamic loader service.

Specified by:
init in interface Service
Parameters:
settings - The settings used by the service.
Returns:
true iff the service has been initialized.

isRunning

public boolean isRunning()
Returns true iff the service is running.

Specified by:
isRunning in interface Service
Returns:
true iff the service is currently running.

getUserObject

public ServiceUserObject getUserObject()
                                throws SecurityException
Returns the service user object.

Specified by:
getUserObject in interface Service
Returns:
a ServiceUserObject.
Throws:
SecurityException - if the calling Thread does not have access to the object.

getChannelTxFilter

public 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. If there is a TX filter at the sending end, there must be a RX filter at the receiving end.


getChannelRxFilter

public 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. The filter returned is safe to use if there is no TX filter at the sending end.


getNonDynamicClassLoadingRxFilter

public 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.


CSP for Java
(JCSP) 1.1-rc4

Submit a bug or feature to jcsp-team@kent.ac.uk
Version 1.1-rc4 of the JCSP API Specification (Copyright 1997-2008 P.D.Austin and P.H.Welch - All Rights Reserved)
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.