|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.net.SecureConnection
public class SecureConnection
SecureConnection is a small wrapper for NetConnection objects, which provides automatic encoding/decoding of messages. objects as Encoded objects.
Encoded,
NetConnection| Constructor Summary | |
|---|---|
SecureConnection(NetConnection con,
SynchronousKey key)
Creates a new SecureConnection object. |
|
| Method Summary | |
|---|---|
void |
close()
DOCUMENT ME! |
NetConnection |
getEmbeddedConnection()
DOCUMENT ME! |
SynchronousKey |
getKey()
DOCUMENT ME! |
java.lang.Object |
getSignature()
DOCUMENT ME! |
java.net.Socket |
getSocket()
DOCUMENT ME! |
boolean |
isActive()
DOCUMENT ME! |
java.lang.Object |
readMessage()
extracts the encoded object from the Encoded object received |
void |
sendMessage(java.lang.Object message)
every message will be encoded before it is sent unless it is already an Encoded object |
void |
setKey(SynchronousKey key)
DOCUMENT ME! |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SecureConnection(NetConnection con,
SynchronousKey key)
con - DOCUMENT ME!key - DOCUMENT ME!| Method Detail |
|---|
public SynchronousKey getKey()
public void setKey(SynchronousKey key)
key - DOCUMENT ME!
java.lang.NullPointerException - DOCUMENT ME!public NetConnection getEmbeddedConnection()
public void close()
close in interface NetConnectionpublic java.lang.Object getSignature()
getSignature in interface NetConnectionpublic java.net.Socket getSocket()
getSocket in interface NetConnectionpublic boolean isActive()
isActive in interface NetConnection
public java.lang.Object readMessage()
throws java.io.IOException,
java.lang.ClassNotFoundException
readMessage in interface NetConnectionjava.io.IOException - also if the key is incorrect when an Encoded message
was received
java.lang.ClassNotFoundException - DOCUMENT ME!
public void sendMessage(java.lang.Object message)
throws java.io.IOException
sendMessage in interface NetConnectionmessage - DOCUMENT ME!
java.io.IOException - DOCUMENT ME!
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||