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 javax.net.ssl.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  javax.net.ssl.SSLServerSocket s
           
protected  SSL ssl
           
protected  SSLWrapperFactory wf
           
 
Constructor Summary
SSLServerSocketWrapper(javax.net.ssl.SSLServerSocket s, SSL ssl, SSLWrapperFactory wf)
           
 
Method Summary
 java.net.Socket accept()
           
 void bind(java.net.SocketAddress endpoint)
           
 void bind(java.net.SocketAddress ep, int bl)
           
 void close()
           
 java.nio.channels.ServerSocketChannel getChannel()
           
 java.lang.String[] getEnabledCipherSuites()
           
 java.lang.String[] getEnabledProtocols()
           
 boolean getEnableSessionCreation()
           
 java.net.InetAddress getInetAddress()
           
 int getLocalPort()
           
 java.net.SocketAddress getLocalSocketAddress()
           
 boolean getNeedClientAuth()
           
 int getReceiveBufferSize()
           
 boolean getReuseAddress()
           
 int getSoTimeout()
           
 java.lang.String[] getSupportedCipherSuites()
           
 java.lang.String[] getSupportedProtocols()
           
 boolean getUseClientMode()
           
 boolean getWantClientAuth()
           
 boolean isBound()
           
 boolean isClosed()
           
 void setEnabledCipherSuites(java.lang.String[] suites)
           
 void setEnabledProtocols(java.lang.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)
           
 java.lang.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 javax.net.ssl.SSLServerSocket s

ssl

protected SSL ssl

wf

protected SSLWrapperFactory wf
Constructor Detail

SSLServerSocketWrapper

public SSLServerSocketWrapper(javax.net.ssl.SSLServerSocket s,
                              SSL ssl,
                              SSLWrapperFactory wf)
                       throws java.io.IOException
Method Detail

accept

public java.net.Socket accept()
                       throws java.io.IOException
Throws:
java.io.IOException

getEnabledCipherSuites

public java.lang.String[] getEnabledCipherSuites()

getEnabledProtocols

public java.lang.String[] getEnabledProtocols()

getEnableSessionCreation

public boolean getEnableSessionCreation()

getNeedClientAuth

public boolean getNeedClientAuth()

getSupportedCipherSuites

public java.lang.String[] getSupportedCipherSuites()

getSupportedProtocols

public java.lang.String[] getSupportedProtocols()

getUseClientMode

public boolean getUseClientMode()

getWantClientAuth

public boolean getWantClientAuth()

setEnabledCipherSuites

public void setEnabledCipherSuites(java.lang.String[] suites)

setEnabledProtocols

public void setEnabledProtocols(java.lang.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(java.net.SocketAddress endpoint)
          throws java.io.IOException
Throws:
java.io.IOException

bind

public void bind(java.net.SocketAddress ep,
                 int bl)
          throws java.io.IOException
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

getChannel

public java.nio.channels.ServerSocketChannel getChannel()

getInetAddress

public java.net.InetAddress getInetAddress()

getLocalPort

public int getLocalPort()

getLocalSocketAddress

public java.net.SocketAddress getLocalSocketAddress()

getReceiveBufferSize

public int getReceiveBufferSize()
                         throws java.net.SocketException
Throws:
java.net.SocketException

getReuseAddress

public boolean getReuseAddress()
                        throws java.net.SocketException
Throws:
java.net.SocketException

getSoTimeout

public int getSoTimeout()
                 throws java.io.IOException
Throws:
java.io.IOException

isBound

public boolean isBound()

isClosed

public boolean isClosed()

setReceiveBufferSize

public void setReceiveBufferSize(int size)
                          throws java.net.SocketException
Throws:
java.net.SocketException

setReuseAddress

public void setReuseAddress(boolean on)
                     throws java.net.SocketException
Throws:
java.net.SocketException

setSoTimeout

public void setSoTimeout(int timeout)
                  throws java.net.SocketException
Throws:
java.net.SocketException

toString

public java.lang.String toString()


Copyright © 2011. All Rights Reserved.