Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

jac.core.dist.rmi
Class RMIRemoteContainer  view RMIRemoteContainer download RMIRemoteContainer.java

java.lang.Object
  extended byjava.rmi.server.RemoteObject
      extended byjava.rmi.server.RemoteServer
          extended byjava.rmi.server.UnicastRemoteObject
              extended byjac.core.dist.rmi.RMIRemoteContainer
All Implemented Interfaces:
java.rmi.Remote, RMIRemoteContainerInterf, java.io.Serializable

public class RMIRemoteContainer
extends java.rmi.server.UnicastRemoteObject
implements RMIRemoteContainerInterf

RMIRemoteContainer is a container for remote objects that can be accessed with the RMI communication protocol. RMIRemoteContainer delegates most of his job to a RemoteContainer. RMIRemoteContainer instances are created by RMIDistd.

Version:
0.8.1

Field Summary
protected  jac.core.dist.RemoteContainer delegate
          The remote container to which most of the job is delegated.
 
Fields inherited from class java.rmi.server.UnicastRemoteObject
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
RMIRemoteContainer()
          Create a new container.
RMIRemoteContainer(boolean verbose)
          Create a new container.
RMIRemoteContainer(java.lang.String className, boolean verbose)
          Create a new container.
 
Method Summary
 jac.core.dist.RemoteRef bindTo(java.lang.String name)
          Returns a remote reference on the object corresponding to the given name.
 void copy(java.lang.String name, int index, java.lang.String[] fields, byte[] state, jac.core.Collaboration collaboration)
          Copy a state into a base object.
 byte[] getByteCodeFor(java.lang.String className)
           
 jac.core.dist.RemoteContainer getDelegate()
          Getter method for the delegate field.
 int instantiates(java.lang.String name, java.lang.String className, java.lang.Object[] args, java.lang.String[] fields, byte[] state, jac.core.Collaboration collaboration)
          This method instantiates a className object.
 byte[] invoke(int index, java.lang.String methodName, byte[] methodArgs, jac.core.Collaboration collaboration)
          Invoke a method on a base object.
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

delegate

protected jac.core.dist.RemoteContainer delegate
The remote container to which most of the job is delegated.

Constructor Detail

RMIRemoteContainer

public RMIRemoteContainer()
                   throws java.rmi.RemoteException
Create a new container.


RMIRemoteContainer

public RMIRemoteContainer(boolean verbose)
                   throws java.rmi.RemoteException
Create a new container.


RMIRemoteContainer

public RMIRemoteContainer(java.lang.String className,
                          boolean verbose)
                   throws java.rmi.RemoteException
Create a new container.

Method Detail

getDelegate

public jac.core.dist.RemoteContainer getDelegate()
Getter method for the delegate field.


instantiates

public int instantiates(java.lang.String name,
                        java.lang.String className,
                        java.lang.Object[] args,
                        java.lang.String[] fields,
                        byte[] state,
                        jac.core.Collaboration collaboration)
                 throws java.rmi.RemoteException
This method instantiates a className object. Clients call it to remotely instantiate an object. instantiates creates an object and returns its index. This method is part of the RMIRemoteContainerInterf interface.

Specified by:
instantiates in interface RMIRemoteContainerInterf

copy

public void copy(java.lang.String name,
                 int index,
                 java.lang.String[] fields,
                 byte[] state,
                 jac.core.Collaboration collaboration)
          throws java.rmi.RemoteException
Copy a state into a base object. This method is part of the RMIRemoteContainerInterf interface.

Specified by:
copy in interface RMIRemoteContainerInterf

invoke

public byte[] invoke(int index,
                     java.lang.String methodName,
                     byte[] methodArgs,
                     jac.core.Collaboration collaboration)
              throws java.rmi.RemoteException
Invoke a method on a base object. The base object is the remote counterpart of a local object that has been remotely instantiated by a remote container. This method is part of the RMIRemoteContainerInterf interface.

Specified by:
invoke in interface RMIRemoteContainerInterf

getByteCodeFor

public byte[] getByteCodeFor(java.lang.String className)
                      throws java.rmi.RemoteException
Specified by:
getByteCodeFor in interface RMIRemoteContainerInterf

bindTo

public jac.core.dist.RemoteRef bindTo(java.lang.String name)
                               throws java.rmi.RemoteException
Returns a remote reference on the object corresponding to the given name.

Specified by:
bindTo in interface RMIRemoteContainerInterf