|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.rmi.activation.ActivationID | +--java.rmi.activation.SecureActivationID
A secure subclass of ActivationID
that implements the
RemoteSecurity
interface by delegating to the contained
activator.
This class exists as a convenience for secure activation system daemon implementations, to avoid requiring all such implementations to make code available for dynamic download to clients.
Inner Class Summary | |
static class |
SecureActivationID.Verifier
A ProxyTrust.Verifier for SecureActivationID
instances. |
Fields inherited from class java.rmi.activation.ActivationID |
activator, uid |
Constructor Summary | |
SecureActivationID(java.rmi.activation.Activator activator)
Creates a secure activation identifier containing the specified remote object activator. |
Method Summary | |
boolean |
equals(java.lang.Object obj)
Compares two activation ids for content equality. |
boolean |
equalsIgnoreConstraints(java.lang.Object obj)
Returns true if the two proxies are equal, ignoring both
client and server security constraints; returns false
otherwise. |
SecurityConstraints |
getClientConstraints()
Returns the current client constraints, as a non- null
instance. |
SecurityConstraints |
getServerConstraints(java.lang.String name,
java.lang.Class[] parameterTypes)
Returns the server's constraints for the specified method as a non- null instance. |
javax.security.auth.Subject |
getServerSubject()
Connects to the server as if a remote call were to be performed (with security constraints being applied in the normal way), and returns the authenticated identity of the server as a read-only instance, or null if the server has not been authenticated. |
RemoteSecurity |
setClientConstraints(SecurityConstraints constraints)
Returns a new copy of this proxy with the specified client constraints attached. |
Methods inherited from class java.rmi.activation.ActivationID |
activate, hashCode |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SecureActivationID(java.rmi.activation.Activator activator)
activator
- the activatorjava.lang.IllegalArgumentException
- if the specified activator does not
implement both RemoteSecurity
and
ProxyTrust
Method Detail |
public RemoteSecurity setClientConstraints(SecurityConstraints constraints)
null
is specified, an empty constraints
instance is used instead.
The specified client constraints are attached by calling
setClientConstraints
on the contained activator.
setClientConstraints
in interface RemoteSecurity
java.rmi.RemoteSecurity
constraints
- client constraints, or null
public SecurityConstraints getClientConstraints()
RemoteSecurity
null
instance.getClientConstraints
in interface RemoteSecurity
java.rmi.RemoteSecurity
null
instancepublic SecurityConstraints getServerConstraints(java.lang.String name, java.lang.Class[] parameterTypes) throws java.lang.NoSuchMethodException, java.rmi.RemoteException
null
instance. The values can vary with the remote
method, so the particular method must be specified by giving the
method name and parameter types. The value of
parameterTypes
can be null
, which is treated
the same as an empty array.
This method simply delegates to the getServerConstraints
method of the contained activator.
getServerConstraints
in interface RemoteSecurity
java.rmi.RemoteSecurity
methodName
- the name of the remote methodparameterTypes
- the formal parameter types of the remote method,
in declared ordernull
instancejava.lang.NoSuchMethodException
- if the specified method does not existNullPointerException
- if methodName
is
null
or any element of parameterTypes
is
null
java.lang.IllegalArgumentException
- if the specified method exists but
is not a remote method and is not the getServerSubject
method of this interfacejava.rmi.RemoteException
- if a communication-related exception occurspublic javax.security.auth.Subject getServerSubject() throws java.rmi.RemoteException
RemoteSecurity
null
if the server has not been authenticated. Note that
checking the authenticated identity of the server obtained from calling
this method is no guarantee that the server will correctly authenticate
itself in any future calls. Although a client might not specify a
ServerMinPrincipal
requirement when calling this method, a client generally needs to
specify a ServerMinPrincipal
requirement for other methods
when server authentication is needed, or else verify that the server
has specified a satisfactory ServerMinPrincipal
requirement for each of the methods that the client cares about. This
method can be used to obtain principals with which to create such a
ServerMinPrincipal
requirement.getServerSubject
in interface RemoteSecurity
java.rmi.RemoteSecurity
null
if the server has not been authenticatedjava.rmi.RemoteException
- if a communication-related exception occurspublic boolean equalsIgnoreConstraints(java.lang.Object obj)
RemoteSecurity
true
if the two proxies are equal, ignoring both
client and server security constraints; returns false
otherwise. For stubs, this method simply checks that the two stubs are
for the same remote object.equalsIgnoreConstraints
in interface RemoteSecurity
java.rmi.RemoteSecurity
obj
- the proxy object with which to comparetrue
if the two proxies are equal, ignoring both
client and server security constraints; false
otherwisepublic boolean equals(java.lang.Object obj)
java.rmi.activation.ActivationID
equals
in class java.rmi.activation.ActivationID
java.rmi.activation.ActivationID
obj
- the Object to compare withHashtable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |