|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.net.SSLSocketConnection
public class SSLSocketConnection
An SSLSocketConnection provides simplified access to a remote process through an SSLSocket connection.
not done yet
NetConnectionServer,
NetConnectionHandler,
ConnectionDispatcher,
NetConnection| Constructor Summary | |
|---|---|
protected |
SSLSocketConnection(javax.net.ssl.SSLSocket socket,
java.io.ObjectInputStream in,
java.io.ObjectOutputStream out,
java.lang.Object signature)
called by objects that create the connection themselves - including the handshake |
protected |
SSLSocketConnection(java.lang.String hostname,
int port,
java.lang.Object signature)
called by createConnection(), createServerConnection(), or a subclass |
| Method Summary | |
|---|---|
void |
close()
closes the SocketConnection |
static SSLSocketConnection |
createConnection(java.lang.String hostname,
int port,
java.lang.Object signature)
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 |
createServerConnection(int port,
java.lang.Object signature)
|
static SSLSocketConnection |
createServerConnection(javax.net.ssl.SSLServerSocket serverSocket,
java.lang.Object signature)
waits and listens for a single connection to be made and returns an SSLSocketConnection if the connection made matches the signature |
int |
getLocalPort()
|
java.net.InetAddress |
getRemoteHost()
|
int |
getRemotePort()
|
java.lang.Object |
getSignature()
returns the identification type object for this connection; this signature is the same on both sides of the connection. |
java.net.Socket |
getSocket()
returns an SSLSocket |
static void |
init(java.security.KeyStore keyStore,
char[] password)
|
boolean |
isActive()
returns whether this NetConnection is currently active |
java.lang.Object |
readMessage()
reads an object from the connection (operation blocks until object is read) |
void |
sendMessage(java.lang.Object message)
sends an object over the connection |
void |
setSoTimeout(int timeout)
propagates to the embedded socket |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected SSLSocketConnection(java.lang.String hostname,
int port,
java.lang.Object signature)
throws java.io.IOException
java.io.IOException
protected SSLSocketConnection(javax.net.ssl.SSLSocket socket,
java.io.ObjectInputStream in,
java.io.ObjectOutputStream out,
java.lang.Object signature)
throws java.io.IOException
java.io.IOException| Method Detail |
|---|
public static void init(java.security.KeyStore keyStore,
char[] password)
public static SSLSocketConnection createServerConnection(int port,
java.lang.Object signature)
throws java.io.IOException,
HandshakeException,
java.lang.IllegalStateException,
java.security.GeneralSecurityException
java.io.IOException
HandshakeException
java.lang.IllegalStateException
java.security.GeneralSecurityException
public static SSLSocketConnection createServerConnection(javax.net.ssl.SSLServerSocket serverSocket,
java.lang.Object signature)
throws java.io.IOException,
HandshakeException,
java.lang.IllegalStateException
HandshakeException - if the signatures did not match
java.io.IOException
java.lang.IllegalStateException
public static SSLSocketConnection createConnection(java.lang.String hostname,
int port,
java.lang.Object signature)
throws java.io.IOException,
HandshakeException
signature - - an object that identifies the desired type of connection
HandshakeException - if the signatures did not match
java.io.IOExceptionNetConnectionServerpublic boolean isActive()
NetConnection
isActive in interface NetConnection
public void sendMessage(java.lang.Object message)
throws java.io.IOException
NetConnection
sendMessage in interface NetConnectionmessage - DOCUMENT ME!
java.io.IOException - DOCUMENT ME!
public java.lang.Object readMessage()
throws java.io.IOException,
java.lang.ClassNotFoundException
NetConnection
readMessage in interface NetConnectionjava.io.IOException - DOCUMENT ME!
java.lang.ClassNotFoundException - DOCUMENT ME!
public void setSoTimeout(int timeout)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.Object getSignature()
NetConnection
getSignature in interface NetConnectionpublic void close()
close in interface NetConnectionpublic java.net.Socket getSocket()
getSocket in interface NetConnectionpublic java.net.InetAddress getRemoteHost()
public int getRemotePort()
public int getLocalPort()
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||