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, SecurityNames, Closeable

public class SSLSocketConnection
extends SocketConnection
implements SecurityNames

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

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
 
Fields inherited from interface com.antelmann.util.SecurityNames
algorithmParameterGenerator, algorithmParameters, certificateType, cypherAlgorithm, cypherMode, cypherPadding, ditigalSignatureAlgorithm, keyAgreement, keyAlgorithm, keyFactory, keyGenerator, keyPairGenerator, keyStoreType, mac, messageDigestAlgorithm, randomNumberGenerationAlgorithm, secretKeyFactory, sslProtocol
 
Constructor Summary
protected SSLSocketConnection(SSLSocket socket, Handshake handshake)
           
protected SSLSocketConnection(String hostname, int port, Handshake handshake)
          called by createConnection(), createServerConnection(), or a subclass
 
Method Summary
static SSLSocketConnection createConnection(String hostname, int port, Handshake handshake)
          returns a SocketConnection provided there is a Server listening at the specified location with the secified signature; note that this method is blocking.
static SSLSocketConnection createSSLServerConnection(int port, Handshake handshake)
           
static void init(KeyStore keyStore, char[] password)
           
 
Methods inherited from class com.antelmann.net.SocketConnection
close, createConnection, createServerConnection, createServerConnection, createServerConnection, getHandshake, getLocalPort, getLogger, getRemoteHost, getRemotePort, getSocket, 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(String hostname,
                              int port,
                              Handshake handshake)
                       throws IOException
called by createConnection(), createServerConnection(), or a subclass

Throws:
IOException

SSLSocketConnection

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

init

public static void init(KeyStore keyStore,
                        char[] password)

createSSLServerConnection

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

createConnection

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

Throws:
IOException
HandshakeException
See Also:
NetConnectionServer


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