class SslServerEndpointImpl extends Utilities
Modifier and Type | Class and Description |
---|---|
(package private) class |
SslServerEndpointImpl.SslListenCookie
Implements ListenCookie
|
(package private) class |
SslServerEndpointImpl.SslListenEndpoint
Implements ListenEndpoint
|
(package private) class |
SslServerEndpointImpl.SslListenHandle
Implements ListenHandle
|
(package private) class |
SslServerEndpointImpl.SslServerConnection
Implements ServerConnection
|
Utilities.SSLContextInfo
Modifier and Type | Field and Description |
---|---|
private ServerAuthManager |
authManager
The authentication manager for the SSLContext for this endpoint -- set
by sslInit.
|
private static ServerConnManager |
defaultServerConnectionManager
The default server connection manager.
|
private ServerEndpoint.ListenEndpoint |
listenEndpoint
The listen endpoint.
|
private Permission[] |
listenPermissions
The permissions needed to authenticate when listening on this endpoint,
or null if the server is anonymous.
|
private static LocalHost |
LOCAL_HOST |
(package private) static Logger |
logger
Server logger
|
private long |
maxServerSessionDuration
The maximum time a session should be used before expiring -- non-final
to facilitate testing.
|
(package private) int |
port
The server port
|
(package private) ServerConnManager |
serverConnectionManager
The server connection manager.
|
private ServerEndpoint |
serverEndpoint
The associated server endpoint.
|
(package private) String |
serverHost
The host name that clients should use to connect to this server, or null
if enumerateListenEndpoints should compute the default.
|
(package private) Set |
serverPrincipals
The principals to use for authentication, or null if the server is
anonymous.
|
(package private) ServerSocketFactory |
serverSocketFactory
The server socket factory.
|
private Subject |
serverSubject
The server subject, or null if the server is anonymous.
|
(package private) SocketFactory |
socketFactory
The socket factory for use in the associated Endpoint.
|
private SSLSocketFactory |
sslSocketFactory
The factory for creating JSSE sockets -- set by sslInit
|
(package private) static Executor |
systemExecutor
Executes a Runnable in a system thread -- used for listener accept
threads.
|
ANY_KEY_ALGORITHM, clientLogger, DSA_KEY_ALGORITHM, getSubjectPermission, initLogger, INTEGRITY_PREFERRED, INTEGRITY_REQUIRED, RSA_KEY_ALGORITHM, serverLogger, UNKNOWN_PRINCIPAL
Constructor and Description |
---|
SslServerEndpointImpl(ServerEndpoint serverEndpoint,
Subject serverSubject,
X500Principal[] serverPrincipals,
String serverHost,
int port,
SocketFactory socketFactory,
ServerSocketFactory serverSocketFactory)
Creates an instance of this class.
|
Modifier and Type | Method and Description |
---|---|
(package private) InvocationConstraints |
checkConstraints(InvocationConstraints constraints) |
private SslServerEndpointImpl.SslListenCookie |
checkCookie(ServerEndpoint.ListenCookie cookie)
Checks that the argument is a valid listen cookie for this server
endpoint.
|
(package private) void |
checkListenPermissions(boolean checkSocket)
Check for permission to listen on this endpoint, but only checking
socket permissions if checkSocket is true.
|
private static Set |
checkPrincipals(X500Principal[] principals)
Checks that principals is not empty and contains no nulls, and returns
it as a set.
|
private static Set |
computePrincipals(Subject subject)
Computes the principals in the subject available for authentication
|
(package private) Endpoint |
createEndpoint(String serverHost,
SslServerEndpointImpl.SslListenCookie cookie)
Creates an endpoint for this server endpoint corresponding to the
specified server host and listen cookie.
|
(package private) ServerEndpoint.ListenEndpoint |
createListenEndpoint()
Creates a listen endpoint for this server endpoint.
|
(package private) Endpoint |
enumerateListenEndpoints(ServerEndpoint.ListenContext listenContext) |
boolean |
equals(Object object)
Two instances of this class are equal if they have the same actual
class; have server subjects that compare equal using ==; have server
principals that are either both null or are equal when compared as the
elements of a Set; have the same server host and port; have socket
factories that are either both null, or have the same actual class and
are equal; and have server socket factories that are either both null,
or have the same actual class and are equal.
|
(package private) String |
fieldsToString()
Returns a string representation of the fields of this object.
|
(package private) ServerAuthManager |
getAuthManager()
Returns the ServerAuthManager, calling sslInit if needed.
|
(package private) SSLSocketFactory |
getSSLSocketFactory()
Returns the SSLSocketFactory, calling sslInit if needed.
|
(package private) static InvocationConstraints |
getUnfulfilledConstraints(String cipherSuite,
Principal client,
Principal server,
InvocationConstraints constraints)
Returns null if the constraints are not supported, else any integrity
constraints required or preferred by the arguments.
|
int |
hashCode()
Returns a hash code value for this object.
|
private boolean |
hasListenPermissions()
Returns true if the caller has AuthenticationPermission for listen on
this endpoint.
|
private void |
sslInit()
Initializes the sslSocketFactory and authManager fields.
|
String |
toString()
Returns a string representation of this object.
|
checkValidity, contains, doesEncryption, doesServerAuthentication, equals, firstX509Cert, getCertFactory, getCipherAlgorithm, getClassName, getClientPrincipals, getClientPrincipals, getClientSSLContextInfo, getKeyAlgorithm, getKeyExchangeAlgorithm, getPermittedKeyAlgorithms, getServerPrincipals, getServerSSLContextInfo, getSupportedCipherSuites, hasStrongCipherAlgorithm, logThrow, maintainsIntegrity, permittedKeyAlgorithm, position, releaseClientSSLContextInfo, safeEquals, subjectString, toString
static final Logger logger
private final long maxServerSessionDuration
static final Executor systemExecutor
private static final ServerConnManager defaultServerConnectionManager
private static final LocalHost LOCAL_HOST
private final ServerEndpoint serverEndpoint
private final Subject serverSubject
final Set serverPrincipals
final String serverHost
final int port
final SocketFactory socketFactory
final ServerSocketFactory serverSocketFactory
private final Permission[] listenPermissions
private final ServerEndpoint.ListenEndpoint listenEndpoint
private SSLSocketFactory sslSocketFactory
private ServerAuthManager authManager
ServerConnManager serverConnectionManager
SslServerEndpointImpl(ServerEndpoint serverEndpoint, Subject serverSubject, X500Principal[] serverPrincipals, String serverHost, int port, SocketFactory socketFactory, ServerSocketFactory serverSocketFactory)
private static Set computePrincipals(Subject subject)
private boolean hasListenPermissions()
private static Set checkPrincipals(X500Principal[] principals)
private void sslInit()
final SSLSocketFactory getSSLSocketFactory()
final ServerAuthManager getAuthManager()
public int hashCode()
public boolean equals(Object object)
public String toString()
final String fieldsToString()
final InvocationConstraints checkConstraints(InvocationConstraints constraints) throws UnsupportedConstraintException
UnsupportedConstraintException
static InvocationConstraints getUnfulfilledConstraints(String cipherSuite, Principal client, Principal server, InvocationConstraints constraints)
final Endpoint enumerateListenEndpoints(ServerEndpoint.ListenContext listenContext) throws IOException
IOException
ServerEndpoint.ListenEndpoint createListenEndpoint()
Endpoint createEndpoint(String serverHost, SslServerEndpointImpl.SslListenCookie cookie)
private SslServerEndpointImpl.SslListenCookie checkCookie(ServerEndpoint.ListenCookie cookie)
final void checkListenPermissions(boolean checkSocket)
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.