org.clazzes.remoting.server
Class SSLServerParameters
java.lang.Object
org.clazzes.remoting.SocketParameters
org.clazzes.remoting.server.ServerParameters
org.clazzes.remoting.server.SSLServerParameters
public class SSLServerParameters
- extends ServerParameters
An SSL-specific implementation of the server parameters object.
- Author:
- wglas
Constructor Summary |
SSLServerParameters()
Construct an SSL server parameters object with the following default parameters:
needClientAuthtrue
wantClientAuthfalse
enableSessionCreationtrue
tcpNoDelaytrue
backlog4
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SSLServerParameters
public SSLServerParameters()
- Construct an SSL server parameters object with the following default parameters:
needClientAuth | true |
wantClientAuth | false |
enableSessionCreation | true |
tcpNoDelay | true |
backlog | 4 |
getServerSocketFactory
public javax.net.ServerSocketFactory getServerSocketFactory()
- Return the socket factory used. If not set via {
ServerParameters.setServerSocketFactory(ServerSocketFactory)
,
SSLServerSocketFactory.getDefault()
is returned.
- Overrides:
getServerSocketFactory
in class ServerParameters
- Returns:
- The socket factory used by this client. If not set by
ServerParameters.setServerSocketFactory(ServerSocketFactory)
, ServerSocketFactory.getDefault()
is returned.
tuneSocket
public java.util.Map<java.lang.String,java.lang.Object> tuneSocket(java.net.Socket socket)
throws java.io.IOException
- Description copied from class:
SocketParameters
- Apply user-defined setting to the socket. This may involve
setting of SSL-parameters in derived classes.
- Overrides:
tuneSocket
in class SocketParameters
- Parameters:
socket
- The socket to prepare for connecting.
- Returns:
- A map of connection-bound metadata.
- Throws:
java.io.IOException
- Upon errors from methods of Socket
.- See Also:
SocketMetaData
,
SSLMetaData
tuneServerSocket
public void tuneServerSocket(java.net.ServerSocket serverSocket)
- Description copied from class:
ServerParameters
- Tune a server socket before actually listening to it.
This may involve setting some SSL-specific parameters in subclasses.
- Overrides:
tuneServerSocket
in class ServerParameters
- Parameters:
serverSocket
- The server socket to be parameterized.
getHandshakeCompletedListeners
public java.util.List<javax.net.ssl.HandshakeCompletedListener> getHandshakeCompletedListeners()
- Returns:
- The list of SSL handshake completion listeners to register in
tuneSocket(Socket)
.
setHandshakeCompletedListeners
public void setHandshakeCompletedListeners(java.util.List<javax.net.ssl.HandshakeCompletedListener> handshakeCompletedListeners)
- Parameters:
handshakeCompletedListeners
- The list of SSL handshake completion
listeners to register in tuneSocket(Socket)
to set.
addHandshakeCompletedListeners
public void addHandshakeCompletedListeners(javax.net.ssl.HandshakeCompletedListener handshakeCompletedListener)
- Parameters:
handshakeCompletedListener
- An SSL handshake completion
listener to be registered by tuneSocket(Socket)
to add.
isNeedClientAuth
public boolean isNeedClientAuth()
- Returns:
- Whether the SSL socket requests a obligatory client authentication.
- See Also:
SSLServerSocket.getNeedClientAuth()
setNeedClientAuth
public void setNeedClientAuth(boolean needClientAuth)
- Parameters:
needClientAuth
- The need client authentication flag of the SSL socket to set.- See Also:
SSLServerSocket.setNeedClientAuth(boolean)
isWantClientAuth
public boolean isWantClientAuth()
- Returns:
- Whether the SSL socket requests an optional client authentication.
If
isNeedClientAuth()
returns true
, this flag
is ignored. - See Also:
SSLServerSocket.getWantClientAuth()
setWantClientAuth
public void setWantClientAuth(boolean wantClientAuth)
- Parameters:
wantClientAuth
- The request client authentication flag of the SSL socket to set.
If isNeedClientAuth()
returns true
, this flag
is ignored.- See Also:
SSLServerSocket.setWantClientAuth(boolean)
isEnableSessionCreation
public boolean isEnableSessionCreation()
- Returns:
- Whether to enable session creation on the generated SSL socket.
- See Also:
SSLServerSocket.getEnableSessionCreation()
setEnableSessionCreation
public void setEnableSessionCreation(boolean enableSessionCreation)
- Parameters:
enableSessionCreation
- The session enable flag to set to the SSL socket.- See Also:
SSLServerSocket.setEnableSessionCreation(boolean)
Copyright © 2010. All Rights Reserved.