|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.jini.jeri.ssl.SslEndpoint
An implementation of Endpoint that uses TLS/SSL to support
invocation constraints for direct communication over TCP sockets.
Instances of this class are intended to be created by the BasicJeriExporter class when it calls enumerateListenEndpoints on
instances of SslServerEndpoint.
The SslTrustVerifier trust verifier may be used for establishing
trust in remote proxies that use instances of this class.
This class supports at least the following constraints, possibly limited by the available cipher suites:
ClientAuthentication
ClientMaxPrincipal, when it contains an X500Principal
ClientMaxPrincipalType, when it contains
X500Principal
ClientMinPrincipal, when it contains a single
X500Principal only
ClientMinPrincipalType, when it contains
X500Principal only
Confidentiality
ConfidentialityStrength, a provider-specific constraint for
specifying weak or strong confidentiality
ConnectionAbsoluteTime
ConstraintAlternatives, if the elements all have the same
actual class and at least one element is supported
Delegation.NO
Delegation.YES, trivially, for anonymous clients
DelegationAbsoluteTime, trivially, when delegation is not
supported
Integrity.YES
ServerAuthentication
ServerMinPrincipal, when it contains a single
X500Principal only
Note that ConnectionRelativeTime and DelegationRelativeTime
constraints may be used at higher levels, but should be converted to the
associated absolute time constraints for use by this class.
This class authenticates as a single Principal if the following
items are present in the current Subject:
X500Principal
CertPath, whose
getType method returns "X.509", and for which calling
getSubjectDN on the certificate chain's first element
returns that principal's name
X500PrivateCredential, stored as a private credential, whose
getCertificate method returns a value equal to the first
element of the certificate chain, and whose getPrivateKey
method returns the associated private key
In addition, this class's newRequest method will only
authenticate as a given principal if the caller has been granted AuthenticationPermission with that principal as the local principal, the
principal representing the authenticated identity of the server as the peer
principal, and the connect action.
This class supports remote connections between authenticated servers and
authenticated or anonymous clients, and between anonymous servers and
anonymous clients. Connections between anonymous servers and authenticated
clients are not supported. Because of the suites available in the TLS/SSL
protocol, support for Confidentiality.NO requires the server to
authenticate with an RSA public key.
This class permits specifying a SocketFactory for creating the
Socket instances that it uses to make remote connections. These
socket factories should not be instances of SSLSocketFactory or
return instances SSLSocket; it is the responsibility of the
implementation to establish a TLS/SSL connection over the socket it obtains
from the socket factory.
A SocketFactory used with instances of this class should be
serializable, and must implement Object.equals to
obey the guidelines that are specified for equals methods of
Endpoint instances.
This class uses the Jini(TM) extensible remote invocation (Jini ERI) multiplexing protocol to map outgoing requests to socket connections.
SslServerEndpoint,
ConfidentialityStrength,
SslTrustVerifier,
Serialized Form| Method Summary | |
boolean |
checkTrustEquivalence(Object obj)
Returns true if the argument is an instance of
SslEndpoint with the same values for server host and port;
and either both this instance and the argument have null
socket factories, or the factories have the same actual class and are
equal; and returns false otherwise. |
boolean |
equals(Object object)
Two instances of this class are equal if they have the same values for server host and port; and have socket factories that are either both null, or have the same actual class and are equal. |
String |
getHost()
Returns the server host that this endpoint connects to. |
static SslEndpoint |
getInstance(String serverHost,
int port)
Returns a TLS/SSL endpoint for the specified server host and port. |
static SslEndpoint |
getInstance(String serverHost,
int port,
SocketFactory socketFactory)
Returns a TLS/SSL endpoint for the specified server host, port, and socket factory. |
int |
getPort()
Returns the TCP port that this endpoint connects to. |
SocketFactory |
getSocketFactory()
Returns the socket factory that this endpoint uses to create Socket instances, or null if it uses default sockets. |
int |
hashCode()
Returns a hash code value for this object. |
OutboundRequestIterator |
newRequest(InvocationConstraints constraints)
Returns an OutboundRequestIterator to use to send
a new request to this remote endpoint using the specified
constraints.
The constraints must be the complete, absolute constraints
for the request.
If there is a security manager, the |
String |
toString()
Returns a string representation of this object. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
public static SslEndpoint getInstance(String serverHost,
int port)
null socket factory to create default sockets.
serverHost - the name of the server hostport - the server port
SslEndpoint instance
IllegalArgumentException - if port is less than or
equal to 0, or greater than 65535
NullPointerException - if serverHost is
null
public static SslEndpoint getInstance(String serverHost,
int port,
SocketFactory socketFactory)
socketFactory of null uses
default sockets.
serverHost - the name of the server hostport - the server portsocketFactory - the socket factory, or null
SslEndpoint instance
IllegalArgumentException - if port is less than or
equal to 0, or greater than 65535
NullPointerException - if serverHost is
nullpublic String getHost()
public int getPort()
public SocketFactory getSocketFactory()
Socket instances, or null if it uses default sockets.
null if it uses default socketspublic String toString()
public int hashCode()
public boolean equals(Object object)
null, or have the same actual class and are equal.
public OutboundRequestIterator newRequest(InvocationConstraints constraints)
OutboundRequestIterator to use to send
a new request to this remote endpoint using the specified
constraints.
The constraints must be the complete, absolute constraints for the request.
If there is a security manager, the next method defined on the iterator returned by this method calls the
security manager's checkConnect
method with the endpoint's server host and port.
newRequest in interface Endpointconstraints - the complete, absolute constraints
OutboundRequestIterator to use to send
a new request to this remote endpoint
NullPointerException - if constraints is
nullpublic boolean checkTrustEquivalence(Object obj)
true if the argument is an instance of
SslEndpoint with the same values for server host and port;
and either both this instance and the argument have null
socket factories, or the factories have the same actual class and are
equal; and returns false otherwise.
checkTrustEquivalence in interface TrustEquivalenceobj - object to check that is not yet known to be trusted
true if the specified object (that is not yet
known to be trusted) is equivalent in trust, content, and function to
this known trusted object, and returns false otherwise
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||