org.objectweb.jac.core.dist.rmi
Interface RMIRemoteContainerInterf

All Superinterfaces:
Remote
All Known Implementing Classes:
RMIRemoteContainer

public interface RMIRemoteContainerInterf
extends Remote

RMIRemoteContainerInterf is the interface of RMI remote containers that are used by jac to remotely instantiate objects.

Author:
Lionel Seinturier

Method Summary
 RemoteRef bindTo(String name)
          Returns a remote reference on the object corresponding to the given name.
 void copy(String name, int index, String[] fields, byte[] state, byte[] collaboration)
          Copy a state into a base object.
 byte[] getByteCodeFor(String className)
           
 int instantiates(String name, String className, Object[] args, String[] fields, byte[] state, byte[] collaboration)
          This method instantiates a className object.
 byte[] invoke(int index, String methodName, byte[] methodArgs, byte[] collaboration)
          Invoke a method on a base object.
 byte[] invokeRoleMethod(int index, String methodName, byte[] methodArgs, byte[] collaboration)
           
 

Method Detail

instantiates

public int instantiates(String name,
                        String className,
                        Object[] args,
                        String[] fields,
                        byte[] state,
                        byte[] collaboration)
                 throws RemoteException
This method instantiates a className object. Clients call it to remotely instantiate an object. instantiates creates an object and returns its index.

Parameters:
className - the class name to instantiate
args - initialization arguments for the instantiation
fields - the object fields that are part of the state
state - the state to copy
collaboration - the collaboration of the client
Returns:
the index of the className object
Throws:
RemoteException

copy

public void copy(String name,
                 int index,
                 String[] fields,
                 byte[] state,
                 byte[] collaboration)
          throws RemoteException
Copy a state into a base object.

Parameters:
index - the callee index (see org.objectweb.jac.core.JacObject)
fields - the object fields that are part of the state
state - the state to copy
collaboration - the collaboration of the client
Throws:
RemoteException

invoke

public byte[] invoke(int index,
                     String methodName,
                     byte[] methodArgs,
                     byte[] collaboration)
              throws 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 org.objectweb.jac.dist.Distd daemon.

Parameters:
index - the callee index (see org.objectweb.jac.core.JacObject)
methodName - the callee method name
methodArgs - the callee method arguments
Throws:
RemoteException

invokeRoleMethod

public byte[] invokeRoleMethod(int index,
                               String methodName,
                               byte[] methodArgs,
                               byte[] collaboration)
                        throws RemoteException
Throws:
RemoteException

getByteCodeFor

public byte[] getByteCodeFor(String className)
                      throws RemoteException
Throws:
RemoteException

bindTo

public RemoteRef bindTo(String name)
                 throws RemoteException
Returns a remote reference on the object corresponding to the given name.

Throws:
RemoteException