|
JXTA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jxta.impl.endpoint.tls.TlsConn
class TlsConn
This class implements the TLS connection between two peers.
Properties: net.jxta.impl.endpoint.tls.TMFAlgorithm - if defined provides the name of the trust manager factory algorithm to use.
Nested Class Summary | |
---|---|
(package private) static class |
TlsConn.HandshakeState
Tracks the state of our TLS connection with a remote peer. |
Field Summary | |
---|---|
(package private) static int |
BOSIZE
|
(package private) String |
closeLock
|
(package private) EndpointAddress |
destAddr
The address of the peer to which we will be forwarding ciphertext messages. |
(package private) long |
lastAccessed
Time that something "good" last happened on the connection |
(package private) String |
lastAccessedLock
|
(package private) int |
retrans
Number of retransmissions we have received. |
(package private) TlsSocket |
tlsSocket
Our synthetic socket which sends and receives the ciphertext. |
(package private) TlsTransport |
transport
TLS transport this connection is working for. |
Constructor Summary | |
---|---|
TlsConn(TlsTransport tp,
EndpointAddress destAddr,
boolean client)
Create a new connection |
Method Summary | |
---|---|
(package private) void |
close(TlsConn.HandshakeState finalstate)
Close this connection. |
(package private) void |
finishHandshake()
Open the connection with the remote peer. |
(package private) TlsConn.HandshakeState |
getHandshakeState()
Returns the current state of the connection |
(package private) void |
sendMessage(Message msg)
sendMessage is called by the TlsMessenger each time a service or an application sends a new message over a TLS connection. |
(package private) boolean |
sendToRemoteTls(Message msg)
Used by the TlsManager and the TlsConn in order to send a message, either a TLS connection establishment, or TLS fragments to the remote TLS. |
(package private) TlsConn.HandshakeState |
setHandshakeState(TlsConn.HandshakeState newstate)
Changes the state of the connection. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
static final int BOSIZE
final TlsTransport transport
final EndpointAddress destAddr
long lastAccessed
final String lastAccessedLock
final String closeLock
int retrans
final TlsSocket tlsSocket
Constructor Detail |
---|
TlsConn(TlsTransport tp, EndpointAddress destAddr, boolean client) throws Exception
Exception
Method Detail |
---|
public String toString()
toString
in class Object
TlsConn.HandshakeState getHandshakeState()
TlsConn.HandshakeState setHandshakeState(TlsConn.HandshakeState newstate)
Object.notifyAll()
to wake any threads waiting on
connection state changes.
newstate
- the new connection state.
void finishHandshake() throws IOException
IOException
void close(TlsConn.HandshakeState finalstate) throws IOException
finalstate
- state that the connection will be in after close.
IOException
boolean sendToRemoteTls(Message msg) throws IOException
msg
- message to send to the remote TLS peer.
IOException
- if there was a problem sending the message.void sendMessage(Message msg) throws IOException
msg
- The plaintext message to be sent via this connection.
IOException
- for errors in sending the message.
|
JXSE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |