org.apache.commons.ssl
Class SSLSocketWrapper

java.lang.Object
  extended byjava.net.Socket
      extended byjavax.net.ssl.SSLSocket
          extended byorg.apache.commons.ssl.SSLSocketWrapper

public class SSLSocketWrapper
extends SSLSocket

Since:
16-Aug-2006
Author:
Credit Union Central of British Columbia, www.cucbc.com, juliusdavies@cucbc.com

Field Summary
protected  SSLSocket s
           
 
Fields inherited from class java.net.Socket
 
Constructor Summary
SSLSocketWrapper(SSLSocket s)
           
 
Method Summary
 void addHandshakeCompletedListener(HandshakeCompletedListener hcl)
           
 void bind(SocketAddress bindpoint)
           
 void close()
           
 void connect(SocketAddress endpoint)
           
 void connect(SocketAddress endpoint, int timeout)
           
 SocketChannel getChannel()
           
 String[] getEnabledCipherSuites()
           
 String[] getEnabledProtocols()
           
 boolean getEnableSessionCreation()
           
 InetAddress getInetAddress()
           
 InputStream getInputStream()
           
 boolean getKeepAlive()
           
 InetAddress getLocalAddress()
           
 int getLocalPort()
           
 SocketAddress getLocalSocketAddress()
           
 boolean getNeedClientAuth()
           
 boolean getOOBInline()
           
 OutputStream getOutputStream()
           
 int getPort()
           
 int getReceiveBufferSize()
           
 SocketAddress getRemoteSocketAddress()
           
 boolean getReuseAddress()
           
 int getSendBufferSize()
           
 SSLSession getSession()
           
 int getSoLinger()
           
 int getSoTimeout()
           
 String[] getSupportedCipherSuites()
           
 String[] getSupportedProtocols()
           
 boolean getTcpNoDelay()
           
 int getTrafficClass()
           
 boolean getUseClientMode()
           
 boolean getWantClientAuth()
           
 boolean isBound()
           
 boolean isClosed()
           
 boolean isConnected()
           
 boolean isInputShutdown()
           
 boolean isOutputShutdown()
           
 void removeHandshakeCompletedListener(HandshakeCompletedListener hcl)
           
 void sendUrgentData(int data)
           
 void setEnabledCipherSuites(String[] cs)
           
 void setEnabledProtocols(String[] ep)
           
 void setEnableSessionCreation(boolean b)
           
 void setKeepAlive(boolean on)
           
 void setNeedClientAuth(boolean b)
           
 void setOOBInline(boolean on)
           
 void setReceiveBufferSize(int size)
           
 void setReuseAddress(boolean on)
           
 void setSendBufferSize(int size)
           
 void setSoLinger(boolean on, int l)
           
 void setSoTimeout(int timeout)
           
 void setTcpNoDelay(boolean on)
           
 void setTrafficClass(int tc)
           
 void setUseClientMode(boolean b)
           
 void setWantClientAuth(boolean b)
           
 void shutdownInput()
           
 void shutdownOutput()
           
 void startHandshake()
           
 String toString()
           
 
Methods inherited from class java.net.Socket
setSocketImplFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

s

protected SSLSocket s
Constructor Detail

SSLSocketWrapper

public SSLSocketWrapper(SSLSocket s)
Method Detail

addHandshakeCompletedListener

public void addHandshakeCompletedListener(HandshakeCompletedListener hcl)

removeHandshakeCompletedListener

public void removeHandshakeCompletedListener(HandshakeCompletedListener hcl)

getSupportedCipherSuites

public String[] getSupportedCipherSuites()

getEnableSessionCreation

public boolean getEnableSessionCreation()

getEnabledCipherSuites

public String[] getEnabledCipherSuites()

getSupportedProtocols

public String[] getSupportedProtocols()

getEnabledProtocols

public String[] getEnabledProtocols()

getSession

public SSLSession getSession()

getUseClientMode

public boolean getUseClientMode()

getNeedClientAuth

public boolean getNeedClientAuth()

getWantClientAuth

public boolean getWantClientAuth()

setEnabledCipherSuites

public void setEnabledCipherSuites(String[] cs)

setEnabledProtocols

public void setEnabledProtocols(String[] ep)

startHandshake

public void startHandshake()
                    throws IOException
Throws:
IOException

setUseClientMode

public void setUseClientMode(boolean b)

setNeedClientAuth

public void setNeedClientAuth(boolean b)

setWantClientAuth

public void setWantClientAuth(boolean b)

setEnableSessionCreation

public void setEnableSessionCreation(boolean b)

getChannel

public SocketChannel getChannel()

getInetAddress

public InetAddress getInetAddress()

getKeepAlive

public boolean getKeepAlive()
                     throws SocketException
Throws:
SocketException

getLocalAddress

public InetAddress getLocalAddress()

getLocalPort

public int getLocalPort()

getLocalSocketAddress

public SocketAddress getLocalSocketAddress()

getOOBInline

public boolean getOOBInline()
                     throws SocketException
Throws:
SocketException

getPort

public int getPort()

getReceiveBufferSize

public int getReceiveBufferSize()
                         throws SocketException
Throws:
SocketException

getRemoteSocketAddress

public SocketAddress getRemoteSocketAddress()

getReuseAddress

public boolean getReuseAddress()
                        throws SocketException
Throws:
SocketException

getSendBufferSize

public int getSendBufferSize()
                      throws SocketException
Throws:
SocketException

getSoLinger

public int getSoLinger()
                throws SocketException
Throws:
SocketException

getSoTimeout

public int getSoTimeout()
                 throws SocketException
Throws:
SocketException

getTcpNoDelay

public boolean getTcpNoDelay()
                      throws SocketException
Throws:
SocketException

getTrafficClass

public int getTrafficClass()
                    throws SocketException
Throws:
SocketException

isBound

public boolean isBound()

isClosed

public boolean isClosed()

isConnected

public boolean isConnected()

isInputShutdown

public boolean isInputShutdown()

isOutputShutdown

public boolean isOutputShutdown()

sendUrgentData

public void sendUrgentData(int data)
                    throws IOException
Throws:
IOException

setKeepAlive

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

setOOBInline

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

setReceiveBufferSize

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

setReuseAddress

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

setSendBufferSize

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

setSoLinger

public void setSoLinger(boolean on,
                        int l)
                 throws SocketException
Throws:
SocketException

setSoTimeout

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

setTcpNoDelay

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

setTrafficClass

public void setTrafficClass(int tc)
                     throws SocketException
Throws:
SocketException

shutdownInput

public void shutdownInput()
                   throws IOException
Throws:
IOException

shutdownOutput

public void shutdownOutput()
                    throws IOException
Throws:
IOException

toString

public String toString()

bind

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

close

public void close()
           throws IOException
Throws:
IOException

connect

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

connect

public void connect(SocketAddress endpoint,
                    int timeout)
             throws IOException
Throws:
IOException

getInputStream

public InputStream getInputStream()
                           throws IOException
Throws:
IOException

getOutputStream

public OutputStream getOutputStream()
                             throws IOException
Throws:
IOException