|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.grizzly.util.net.ServerSocketFactory
com.sun.grizzly.util.net.jsse.JSSESocketFactory
public abstract class JSSESocketFactory
SSL server socket factory. It _requires_ a valid RSA key and JSSE.
Field Summary | |
---|---|
protected boolean |
clientAuth
|
protected String[] |
enabledCiphers
|
protected boolean |
initialized
|
protected static Logger |
logger
|
protected SSLServerSocketFactory |
sslProxy
|
Fields inherited from class com.sun.grizzly.util.net.ServerSocketFactory |
---|
attributes, context |
Constructor Summary | |
---|---|
JSSESocketFactory()
|
Method Summary | |
---|---|
Socket |
acceptSocket(ServerSocket socket)
Wrapper function for accept(). |
ServerSocket |
createSocket(int port)
Returns a server socket which uses all network interfaces on the host, and is bound to a the specified port. |
ServerSocket |
createSocket(int port,
int backlog)
Returns a server socket which uses all network interfaces on the host, is bound to a the specified port, and uses the specified connection backlog. |
ServerSocket |
createSocket(int port,
int backlog,
InetAddress ifAddress)
Returns a server socket which uses only the specified network interface on the local host, is bound to a the specified port, and uses the specified connection backlog. |
protected String[] |
getEnabledCiphers(String requestedCiphers,
String[] supportedCiphers)
|
protected abstract String[] |
getEnabledProtocols(SSLServerSocket socket,
String requestedProtocols)
|
protected KeyStore |
getKeystore(String pass)
|
protected String |
getKeystorePassword()
|
protected KeyStore |
getTrustStore()
|
protected String |
getTruststorePassword()
|
void |
handshake(Socket sock)
Extra function to initiate the handshake. |
abstract void |
init()
Reads the keystore and initializes the SSL socket factory. |
protected void |
initServerSocket(ServerSocket ssocket)
Configures the given SSL server socket with the requested cipher suites, protocol versions, and need for client authentication |
protected abstract void |
setEnabledProtocols(SSLServerSocket socket,
String[] protocols)
Set the SSL protocol variants to be enabled. |
Methods inherited from class com.sun.grizzly.util.net.ServerSocketFactory |
---|
getDefault, getSSLContext, initSocket, setAttribute |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final Logger logger
protected boolean initialized
protected boolean clientAuth
protected SSLServerSocketFactory sslProxy
protected String[] enabledCiphers
Constructor Detail |
---|
public JSSESocketFactory()
Method Detail |
---|
public ServerSocket createSocket(int port) throws IOException
ServerSocketFactory
createSocket
in class ServerSocketFactory
port
- the port to listen to
IOException
- for networking errorspublic ServerSocket createSocket(int port, int backlog) throws IOException
ServerSocketFactory
createSocket
in class ServerSocketFactory
port
- the port to listen tobacklog
- how many connections are queued
IOException
- for networking errorspublic ServerSocket createSocket(int port, int backlog, InetAddress ifAddress) throws IOException
ServerSocketFactory
createSocket
in class ServerSocketFactory
port
- the port to listen tobacklog
- how many connections are queuedifAddress
- the network interface address to use
IOException
- for networking errorspublic Socket acceptSocket(ServerSocket socket) throws IOException
ServerSocketFactory
acceptSocket
in class ServerSocketFactory
IOException
public void handshake(Socket sock) throws IOException
ServerSocketFactory
handshake
in class ServerSocketFactory
IOException
protected String[] getEnabledCiphers(String requestedCiphers, String[] supportedCiphers)
protected String getKeystorePassword()
protected KeyStore getKeystore(String pass) throws IOException
IOException
protected String getTruststorePassword()
protected KeyStore getTrustStore() throws IOException
IOException
public abstract void init() throws IOException
init
in class ServerSocketFactory
IOException
protected abstract String[] getEnabledProtocols(SSLServerSocket socket, String requestedProtocols)
protected abstract void setEnabledProtocols(SSLServerSocket socket, String[] protocols)
socket
- the SSLServerSocket.protocols
- the protocols to use.protected void initServerSocket(ServerSocket ssocket)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |