org.objectweb.jac.core.dist.rmi
Class RMIDistd

java.lang.Object
  |
  +--org.objectweb.jac.core.dist.Distd
        |
        +--org.objectweb.jac.core.dist.rmi.RMIDistd

public class RMIDistd
extends Distd

RMIDistd is a jac daemon that supports the RMI communication protocol. Daemons hold containers (only one for the moment) which themselves hold remote objects.

Author:
Lionel Seinturier

Field Summary
 
Fields inherited from class org.objectweb.jac.core.dist.Distd
containers, flags, inputCount, localContainerName, options, outputCount, referenceContainerName, verbose
 
Constructor Summary
RMIDistd(String[] args)
          The is the main constructor.
 
Method Summary
 void init()
          This method initializes the RMI communication protocol.
static void main(String[] args)
           
protected  RemoteContainer newContainer(String name)
          This method creates a new container and returns it.
protected  RemoteContainer newContainer(String name, String className)
          This method creates a new container, instantiates a given class, and returns the container.
protected  void registerContainer(RMIRemoteContainer container, String name)
          Registers a container in the RMI registry.
 void run()
          This method enters the event loop of the underlying communication protocol.
 
Methods inherited from class org.objectweb.jac.core.dist.Distd
containsContainer, getFullHostName, getLocalContainerName, parseArguments, stringArrayToHashtable, usage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RMIDistd

public RMIDistd(String[] args)
The is the main constructor.

Parameters:
args - command line arguments
Method Detail

init

public void init()
This method initializes the RMI communication protocol.

Specified by:
init in class Distd

newContainer

protected RemoteContainer newContainer(String name)
                                throws Exception
This method creates a new container and returns it.

Specified by:
newContainer in class Distd
Parameters:
name - the container name
Returns:
the container reference
Exception

newContainer

protected RemoteContainer newContainer(String name,
                                       String className)
                                throws Exception
This method creates a new container, instantiates a given class, and returns the container.

Specified by:
newContainer in class Distd
Parameters:
name - the container name
className - the name of the class to instantiate
Returns:
the container reference
Exception

registerContainer

protected void registerContainer(RMIRemoteContainer container,
                                 String name)
                          throws RemoteException
Registers a container in the RMI registry.

Parameters:
container - the container reference
name - the container name
RemoteException

run

public void run()
This method enters the event loop of the underlying communication protocol.

Specified by:
run in class Distd

main

public static void main(String[] args)