org.objectweb.jeremie.binding.api
Interface RMIContext

All Known Implementing Classes:
MOAContext, SOAContext

public interface RMIContext

This defines the essential interface of standard RMI UnicastRemoteObjects.


Method Summary
 RemoteStub export(Remote obj, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf)
          Exports a remote object on the specified port.
 boolean unexport(Remote obj, boolean force)
          Unexports the specified remote object.
 

Method Detail

export

RemoteStub export(Remote obj,
                  int port,
                  RMIClientSocketFactory csf,
                  RMIServerSocketFactory ssf)
                  throws RemoteException
Exports a remote object on the specified port. Incoming calls are accepted on the port via a server socket supplied by the specified server socket factory. Clients will make calls via sockets supplied by the specified client socket factory.

Parameters:
obj - the remote object to be exported;
port - the port on which to export the object;
csf - the client socket factory supplying sockets for client-side connections to the remote object;
ssf - the server socket factory supplying a server side socket.
Returns:
a stub for the exported remote object.
Throws:
RemoteException - if something goes wrong.

unexport

boolean unexport(Remote obj,
                 boolean force)
                 throws NoSuchObjectException
Unexports the specified remote object. If the boolean parameter is true, the object is unexported even if there are pending calls or calls in progress. If the boolean parameter is false, the object should be unexported only if there are no pending calls or calls in progress; this is not yet implemented.

Parameters:
obj - the remote object to be unexported;
force - whether the object should be forcibly unexported or not.
Returns:
whether the unexport operation succeeded or not.
Throws:
NoSuchObjectException - if something goes wrong.