java.rmi.server
Class SecureRemoteServer

java.lang.Object
  |
  +--java.rmi.server.SecureRemoteServer

public final class SecureRemoteServer
extends java.lang.Object

Contains common context methods for use by classes that export secure remote objects by using either SecureUnicastRemoteObject or SecureActivatable. Threads executing incoming remote calls for secure remote objects can use the methods of this class to obtain context information for the call.

This class cannot be instantiated.

Since:
1.4

Method Summary
static javax.security.auth.Subject getClientSubject()
          Returns the authenticated identity of the client for the current call as a read-only instance, or null, if the client was not authenticated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getClientSubject

public static javax.security.auth.Subject getClientSubject()
                                                    throws java.rmi.server.ServerNotActiveException
Returns the authenticated identity of the client for the current call as a read-only instance, or null, if the client was not authenticated. If the client delegated to the server, then the returned subject contains any derived delegation credentials; the server can then impersonate the client by performing outbound secure calls (or by receiving incoming secure calls) in the context of a Subject.doAs with the client subject.
Returns:
the authenticated identity of the client for the current call as a read-only instance, or null if the client was not authenticated
Throws:
java.lang.SecurityException - if a security manager exists and its checkPermission method does not allow the operation for an RMIPermission constructed with target name "getClientSubject"
java.rmi.server.ServerNotActiveException - if the current thread is not executing an incoming remote method for a secure remote object


Copyright © 2000 Sun Microsystems, Inc. All rights reserved