|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.rmi.server.SecureUnicastRemoteObject
Exports a secure, non-replicated, remote object which has references that are valid only while the server process is alive.
This class cannot be subclassed or instantiated; the static methods should simply be used as necessary in implementation classes or in code that exports remote objects.
The exported object can perform preinvocation access control and exercise
control over parameter unmarshalling and result marshalling by implementing
RemoteCallControl
.
Threads executing incoming remote calls for secure remote objects can
use the context methods in the
SecureRemoteServer
class.
Method Summary | |
static java.rmi.Remote |
exportObject(java.rmi.Remote obj,
SecureExportDesc desc)
Exports a secure remote object, using the specified export descriptor, and returns a stub for the object. |
static boolean |
unexportObject(java.rmi.Remote obj,
boolean force)
Unexports a secure remote object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static java.rmi.Remote exportObject(java.rmi.Remote obj, SecureExportDesc desc) throws java.rmi.server.ExportException
Unlike UnicastRemoteObject
, there is no
automatic replacement of the stub for the implementation object during
marshalling; either the stub must be passed explicitly, or the
implementation class must be serializable and have a
writeReplace
method that returns the stub.
obj
- the secure remote objectdesc
- the export descriptorjava.rmi.server.ExportException
- if a communication-related exception occurs, or
the specified descriptor has method-specific constraints for a method
that is neither a method from a remote interface nor the
RemoteSecurity.getServerSubject
methodjava.lang.SecurityException
- if the client endpoint produced by any server
endpoint in the export descriptor is not an instance of a trusted classNullPointerException
- if any parameter is null
public static boolean unexportObject(java.rmi.Remote obj, boolean force) throws java.rmi.NoSuchObjectException
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. The return value is
true
if the object is unexported, and false
otherwise.obj
- the secure remote objectforce
- if true
, forcibly unexport the objecttrue
if the object is unexported;
false
otherwisejava.rmi.NoSuchObjectException
- if the remote object is not
currently exported
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |