Holger's
Java API

com.antelmann.net
Class SSLSocketConnection

java.lang.Object
  extended by com.antelmann.net.SocketConnection
      extended by com.antelmann.net.SSLSocketConnection
All Implemented Interfaces:
NetConnection, Closeable

public class SSLSocketConnection
extends SocketConnection

An SSLSocketConnection provides simplified access to a remote process through an SSLSocket connection.

Author:
Holger Antelmann
See Also:
NetConnectionServer, NetConnectionHandler, ConnectionDispatcher, NetConnection

Field Summary
 
Fields inherited from class com.antelmann.net.SocketConnection
autoReset, host, hs, in, logger, out, port, socket
 
Constructor Summary
protected SSLSocketConnection(SSLSocket socket, Handshake handshake)
           
 
Method Summary
static SSLSocketConnection createSSLConnection(SSLHelper helper, String hostname, int port, Handshake handshake)
          returns a SocketConnection provided there is a Server listening at the specified location with the specified signature; note that this method is blocking.
static SSLSocketConnection createSSLServerConnection(SSLHelper helper, int port, Handshake handshake)
           
 SSLSocket getSocket()
          returns the underlying Socket of this connection
 
Methods inherited from class com.antelmann.net.SocketConnection
close, createConnection, createConnection, createServerConnection, createServerConnection, createServerConnection, getHandshake, getLocalPort, getLogger, getRemoteHost, getRemotePort, isActive, isAutoReset, readMessage, reconnect, reconnect, reset, sendMessage, setAutoReset, setLogger, setSoTimeout, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SSLSocketConnection

protected SSLSocketConnection(SSLSocket socket,
                              Handshake handshake)
                       throws IOException
Throws:
IOException
Method Detail

getSocket

public SSLSocket getSocket()
Description copied from interface: NetConnection
returns the underlying Socket of this connection

Specified by:
getSocket in interface NetConnection
Overrides:
getSocket in class SocketConnection

createSSLServerConnection

public static SSLSocketConnection createSSLServerConnection(SSLHelper helper,
                                                            int port,
                                                            Handshake handshake)
                                                     throws IOException,
                                                            GeneralSecurityException
Throws:
IOException
GeneralSecurityException

createSSLConnection

public static SSLSocketConnection createSSLConnection(SSLHelper helper,
                                                      String hostname,
                                                      int port,
                                                      Handshake handshake)
                                               throws IOException,
                                                      GeneralSecurityException
returns a SocketConnection provided there is a Server listening at the specified location with the specified signature; note that this method is blocking.

Throws:
NoSuchAlgorithmException
KeyManagementException
IOException
GeneralSecurityException
See Also:
NetConnectionServer


(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads