|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.replication.protocol.TLSSocketSession
public class TLSSocketSession
This class implements a protocol session using TLS.
Constructor Summary | |
---|---|
TLSSocketSession(java.net.Socket socket,
javax.net.ssl.SSLSocket secureSocket)
Creates a new TLSSocketSession. |
Method Summary | |
---|---|
void |
close()
This method is called when the session with the remote must be closed. |
long |
getLastPublishTime()
Gets the time the last replication message was published on this session. |
long |
getLastReceiveTime()
Gets the time the last replication message was received on this session. |
java.lang.String |
getRemoteAddress()
Retrieve the IP address of the remote server. |
boolean |
isEncrypted()
Determine whether the session is using a security layer. |
void |
publish(ReplicationMessage msg)
This method is called when a ReplicationMessage must be sent to the remote entity. |
ReplicationMessage |
receive()
Attempt to receive a ReplicationMessage. |
void |
setSoTimeout(int timeout)
Set a timeout value. |
void |
stopEncryption()
Stop using the security layer, if there is any. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TLSSocketSession(java.net.Socket socket, javax.net.ssl.SSLSocket secureSocket) throws java.io.IOException
socket
- The regular Socket on which the SocketSession will be
based.secureSocket
- The secure Socket on which the SocketSession will be
based.
java.io.IOException
- When an IException happens on the socket.Method Detail |
---|
public void close() throws java.io.IOException
close
in interface ProtocolSession
java.io.IOException
- If an error happen during the close process.public void publish(ReplicationMessage msg) throws java.io.IOException
publish
in interface ProtocolSession
msg
- The ReplicationMessage that must be sent.
java.io.IOException
- If an IO error happen during the publish process.public ReplicationMessage receive() throws java.io.IOException, java.lang.ClassNotFoundException, java.util.zip.DataFormatException
receive
in interface ProtocolSession
java.io.IOException
- When error happened durin IO process.
java.lang.ClassNotFoundException
- When the data received does extend the
ReplicationMessage class.
java.util.zip.DataFormatException
- When the data received is not formatted as a
ReplicationMessage.public void stopEncryption()
stopEncryption
in interface ProtocolSession
public boolean isEncrypted()
isEncrypted
in interface ProtocolSession
public long getLastPublishTime()
getLastPublishTime
in interface ProtocolSession
public long getLastReceiveTime()
getLastReceiveTime
in interface ProtocolSession
public java.lang.String getRemoteAddress()
getRemoteAddress
in interface ProtocolSession
public void setSoTimeout(int timeout) throws java.net.SocketException
setSoTimeout
in interface ProtocolSession
timeout
- the specified timeout, in milliseconds.
java.net.SocketException
- if there is an error in the underlying protocol,
such as a TCP error.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |