org.apache.commons.ssl
Class SSLServerSocketWrapper
java.lang.Object
java.net.ServerSocket
javax.net.ssl.SSLServerSocket
org.apache.commons.ssl.SSLServerSocketWrapper
public class SSLServerSocketWrapper
- extends SSLServerSocket
Wraps an SSLServerSocket - NOTE that the accept() method applies a number of
important common-ssl settings before returning the SSLSocket!
- Since:
- 20-Nov-2006
- Author:
- Credit Union Central of British Columbia, www.cucbc.com, juliusdavies@cucbc.com
s
protected SSLServerSocket s
ssl
protected SSL ssl
wf
protected SSLWrapperFactory wf
SSLServerSocketWrapper
public SSLServerSocketWrapper(SSLServerSocket s,
SSL ssl,
SSLWrapperFactory wf)
throws IOException
- Throws:
IOException
accept
public Socket accept()
throws IOException
- Overrides:
accept
in class ServerSocket
- Throws:
IOException
getEnabledCipherSuites
public String[] getEnabledCipherSuites()
- Specified by:
getEnabledCipherSuites
in class SSLServerSocket
getEnabledProtocols
public String[] getEnabledProtocols()
- Specified by:
getEnabledProtocols
in class SSLServerSocket
getEnableSessionCreation
public boolean getEnableSessionCreation()
- Specified by:
getEnableSessionCreation
in class SSLServerSocket
getNeedClientAuth
public boolean getNeedClientAuth()
- Specified by:
getNeedClientAuth
in class SSLServerSocket
getSupportedCipherSuites
public String[] getSupportedCipherSuites()
- Specified by:
getSupportedCipherSuites
in class SSLServerSocket
getSupportedProtocols
public String[] getSupportedProtocols()
- Specified by:
getSupportedProtocols
in class SSLServerSocket
getUseClientMode
public boolean getUseClientMode()
- Specified by:
getUseClientMode
in class SSLServerSocket
getWantClientAuth
public boolean getWantClientAuth()
- Specified by:
getWantClientAuth
in class SSLServerSocket
setEnabledCipherSuites
public void setEnabledCipherSuites(String[] suites)
- Specified by:
setEnabledCipherSuites
in class SSLServerSocket
setEnabledProtocols
public void setEnabledProtocols(String[] protocols)
- Specified by:
setEnabledProtocols
in class SSLServerSocket
setEnableSessionCreation
public void setEnableSessionCreation(boolean flag)
- Specified by:
setEnableSessionCreation
in class SSLServerSocket
setNeedClientAuth
public void setNeedClientAuth(boolean need)
- Specified by:
setNeedClientAuth
in class SSLServerSocket
setUseClientMode
public void setUseClientMode(boolean use)
- Specified by:
setUseClientMode
in class SSLServerSocket
setWantClientAuth
public void setWantClientAuth(boolean want)
- Specified by:
setWantClientAuth
in class SSLServerSocket
bind
public void bind(SocketAddress endpoint)
throws IOException
- Overrides:
bind
in class ServerSocket
- Throws:
IOException
bind
public void bind(SocketAddress ep,
int bl)
throws IOException
- Overrides:
bind
in class ServerSocket
- Throws:
IOException
close
public void close()
throws IOException
- Overrides:
close
in class ServerSocket
- Throws:
IOException
getChannel
public ServerSocketChannel getChannel()
- Overrides:
getChannel
in class ServerSocket
getInetAddress
public InetAddress getInetAddress()
- Overrides:
getInetAddress
in class ServerSocket
getLocalPort
public int getLocalPort()
- Overrides:
getLocalPort
in class ServerSocket
getLocalSocketAddress
public SocketAddress getLocalSocketAddress()
- Overrides:
getLocalSocketAddress
in class ServerSocket
getReceiveBufferSize
public int getReceiveBufferSize()
throws SocketException
- Overrides:
getReceiveBufferSize
in class ServerSocket
- Throws:
SocketException
getReuseAddress
public boolean getReuseAddress()
throws SocketException
- Overrides:
getReuseAddress
in class ServerSocket
- Throws:
SocketException
getSoTimeout
public int getSoTimeout()
throws IOException
- Overrides:
getSoTimeout
in class ServerSocket
- Throws:
IOException
isBound
public boolean isBound()
- Overrides:
isBound
in class ServerSocket
isClosed
public boolean isClosed()
- Overrides:
isClosed
in class ServerSocket
setReceiveBufferSize
public void setReceiveBufferSize(int size)
throws SocketException
- Overrides:
setReceiveBufferSize
in class ServerSocket
- Throws:
SocketException
setReuseAddress
public void setReuseAddress(boolean on)
throws SocketException
- Overrides:
setReuseAddress
in class ServerSocket
- Throws:
SocketException
setSoTimeout
public void setSoTimeout(int timeout)
throws SocketException
- Overrides:
setSoTimeout
in class ServerSocket
- Throws:
SocketException
toString
public String toString()
- Overrides:
toString
in class ServerSocket