org.apache.commons.ssl
Class SSLServerSocketWrapper

java.lang.Object
  extended byjava.net.ServerSocket
      extended byjavax.net.ssl.SSLServerSocket
          extended byorg.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

Field Summary
protected  SSLServerSocket s
           
protected  SSL ssl
           
protected  SSLWrapperFactory wf
           
 
Fields inherited from class java.net.ServerSocket
 
Constructor Summary
SSLServerSocketWrapper(SSLServerSocket s, SSL ssl, SSLWrapperFactory wf)
           
 
Method Summary
 Socket accept()
           
 void bind(SocketAddress endpoint)
           
 void bind(SocketAddress ep, int bl)
           
 void close()
           
 ServerSocketChannel getChannel()
           
 String[] getEnabledCipherSuites()
           
 String[] getEnabledProtocols()
           
 boolean getEnableSessionCreation()
           
 InetAddress getInetAddress()
           
 int getLocalPort()
           
 SocketAddress getLocalSocketAddress()
           
 boolean getNeedClientAuth()
           
 int getReceiveBufferSize()
           
 boolean getReuseAddress()
           
 int getSoTimeout()
           
 String[] getSupportedCipherSuites()
           
 String[] getSupportedProtocols()
           
 boolean getUseClientMode()
           
 boolean getWantClientAuth()
           
 boolean isBound()
           
 boolean isClosed()
           
 void setEnabledCipherSuites(String[] suites)
           
 void setEnabledProtocols(String[] protocols)
           
 void setEnableSessionCreation(boolean flag)
           
 void setNeedClientAuth(boolean need)
           
 void setReceiveBufferSize(int size)
           
 void setReuseAddress(boolean on)
           
 void setSoTimeout(int timeout)
           
 void setUseClientMode(boolean use)
           
 void setWantClientAuth(boolean want)
           
 String toString()
           
 
Methods inherited from class java.net.ServerSocket
implAccept, setSocketFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

s

protected SSLServerSocket s

ssl

protected SSL ssl

wf

protected SSLWrapperFactory wf
Constructor Detail

SSLServerSocketWrapper

public SSLServerSocketWrapper(SSLServerSocket s,
                              SSL ssl,
                              SSLWrapperFactory wf)
                       throws IOException
Method Detail

accept

public Socket accept()
              throws IOException
Throws:
IOException

getEnabledCipherSuites

public String[] getEnabledCipherSuites()

getEnabledProtocols

public String[] getEnabledProtocols()

getEnableSessionCreation

public boolean getEnableSessionCreation()

getNeedClientAuth

public boolean getNeedClientAuth()

getSupportedCipherSuites

public String[] getSupportedCipherSuites()

getSupportedProtocols

public String[] getSupportedProtocols()

getUseClientMode

public boolean getUseClientMode()

getWantClientAuth

public boolean getWantClientAuth()

setEnabledCipherSuites

public void setEnabledCipherSuites(String[] suites)

setEnabledProtocols

public void setEnabledProtocols(String[] protocols)

setEnableSessionCreation

public void setEnableSessionCreation(boolean flag)

setNeedClientAuth

public void setNeedClientAuth(boolean need)

setUseClientMode

public void setUseClientMode(boolean use)

setWantClientAuth

public void setWantClientAuth(boolean want)

bind

public void bind(SocketAddress endpoint)
          throws IOException
Throws:
IOException

bind

public void bind(SocketAddress ep,
                 int bl)
          throws IOException
Throws:
IOException

close

public void close()
           throws IOException
Throws:
IOException

getChannel

public ServerSocketChannel getChannel()

getInetAddress

public InetAddress getInetAddress()

getLocalPort

public int getLocalPort()

getLocalSocketAddress

public SocketAddress getLocalSocketAddress()

getReceiveBufferSize

public int getReceiveBufferSize()
                         throws SocketException
Throws:
SocketException

getReuseAddress

public boolean getReuseAddress()
                        throws SocketException
Throws:
SocketException

getSoTimeout

public int getSoTimeout()
                 throws IOException
Throws:
IOException

isBound

public boolean isBound()

isClosed

public boolean isClosed()

setReceiveBufferSize

public void setReceiveBufferSize(int size)
                          throws SocketException
Throws:
SocketException

setReuseAddress

public void setReuseAddress(boolean on)
                     throws SocketException
Throws:
SocketException

setSoTimeout

public void setSoTimeout(int timeout)
                  throws SocketException
Throws:
SocketException

toString

public String toString()