SmartFrog 3.10.000

org.smartfrog.sfcore.security
Class SecureRemoteObject

java.lang.Object
  extended by org.smartfrog.sfcore.security.SecureRemoteObject

public class SecureRemoteObject
extends java.lang.Object

The SecureRemoteObject provides an export static method equivalent to the one in UnicastRemoteObject but, if SF security is active, it will automatically ensure that remote access to the object exported will use JSSE (i.e., SSL), and a system wide policy will be used for authentication and authorization.


Method Summary
static java.rmi.server.RemoteStub exportObject(java.rmi.Remote obj)
          Exports the remote object to make it available to receive incoming calls, using an anonymous port.It adds a jsse connector if security is enabled.
static java.rmi.Remote exportObject(java.rmi.Remote obj, int port)
          Export the remote object to make it available to receive incoming calls, using the particular supplied port.
static boolean unexportObject(java.rmi.Remote obj, boolean force)
          Removes the remote object, obj, from the RMI runtime.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

exportObject

public static java.rmi.Remote exportObject(java.rmi.Remote obj,
                                           int port)
                                    throws java.rmi.RemoteException,
                                           SFGeneralSecurityException
Export the remote object to make it available to receive incoming calls, using the particular supplied port. It adds a jsse connector if security is enabled.

Parameters:
obj - the remote object to be exported
port - the port to export the object on
Returns:
remote object stub
Throws:
java.rmi.RemoteException - if export fails
SFGeneralSecurityException - if we cannot initalize security mechanisms

exportObject

public static java.rmi.server.RemoteStub exportObject(java.rmi.Remote obj)
                                               throws java.rmi.RemoteException,
                                                      SFGeneralSecurityException
Exports the remote object to make it available to receive incoming calls, using an anonymous port.It adds a jsse connector if security is enabled.

Parameters:
obj - the remote object to be exported
Returns:
remote object stub
Throws:
java.rmi.RemoteException - if export fails
SFGeneralSecurityException - if we cannot initalize security mechanisms

unexportObject

public static boolean unexportObject(java.rmi.Remote obj,
                                     boolean force)
                              throws java.rmi.NoSuchObjectException
Removes the remote object, obj, from the RMI runtime. If successful, the object can no longer accept incoming RMI calls. If the force parameter is true, the object is forcibly unexported even if there are pending calls to the remote object or the remote object still has calls in progress. If the force parameter is false, the object is only unexported if there are no pending or in progress calls to the object.

Parameters:
obj - the remote object to be unexported
force - if true, unexports the object even if there are pending or in-progress calls; if false, only unexports the object if there are no pending or in-progress calls
Returns:
true if operation is successful, false otherwise
Throws:
java.rmi.NoSuchObjectException - if the remote object is not currently exported

SmartFrog CORE 3.10.000

(C) Copyright 1998-2006 Hewlett-Packard Development Company, LP