Class TLSTM.SocketEntry
- Enclosing class:
TLSTM
- Since:
- 2.0
- Version:
- 3.5.0
- Author:
- Frank Fock
-
Field Summary
Fields inherited from class AbstractSocketEntry
socketChannel -
Constructor Summary
ConstructorsConstructorDescriptionSocketEntry(TcpAddress address, SocketChannel socketChannel, boolean useClientMode, TransportStateReference tmStateReference) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMessage(byte[] message) Add a message to be sent to the socket entries internal queue.booleanCreates or updates theTransportStateReferenceof this accepted or opened TLS connection.voidClose the (TLS) session associated with the socket entry.Gets the unique identifier of the associated (TLS) session.booleanCheck if there are messages to be sent.booleanbooleanbyte[]Gets the next message from the send queue.voidsetHandshakeFinished(boolean handshakeFinished) voidsetInAppBuffer(ByteBuffer inAppBuffer) voidsetInNetBuffer(ByteBuffer byteBuffer) voidsetOutNetBuffer(ByteBuffer outNetBuffer) voidsetSocketTimeout(SocketTimeout<TcpAddress> socketTimeout) toString()Methods inherited from class AbstractSocketEntry
addRegistration, getMessages, getSocketChannel, insertMessages, isRegistered, nextBusyLoop, removeRegistration, resetBusyLoopsMethods inherited from class AbstractServerSocket
getLastUse, getPeerAddress, getSocketTimeout, used
-
Constructor Details
-
SocketEntry
public SocketEntry(TcpAddress address, SocketChannel socketChannel, boolean useClientMode, TransportStateReference tmStateReference) throws GeneralSecurityException - Throws:
GeneralSecurityException
-
-
Method Details
-
addMessage
public void addMessage(byte[] message) Description copied from class:AbstractSocketEntryAdd a message to be sent to the socket entries internal queue.- Overrides:
addMessagein classAbstractSocketEntry<TcpAddress>- Parameters:
message- a new message to be sent.
-
nextMessage
public byte[] nextMessage()Description copied from class:AbstractSocketEntryGets the next message from the send queue.- Overrides:
nextMessagein classAbstractSocketEntry<TcpAddress>- Returns:
- the next message or
nullif there is no message to be sent left.
-
hasMessage
public boolean hasMessage()Description copied from class:AbstractSocketEntryCheck if there are messages to be sent.- Overrides:
hasMessagein classAbstractSocketEntry<TcpAddress>- Returns:
trueif there is at least one message to be sent queued.
-
setSocketTimeout
- Overrides:
setSocketTimeoutin classAbstractServerSocket<TcpAddress>
-
setInNetBuffer
-
getInNetBuffer
-
getOutNetBuffer
-
setOutNetBuffer
-
toString
- Specified by:
toStringin classAbstractSocketEntry<TcpAddress>
-
checkTransportStateReference
public boolean checkTransportStateReference()Creates or updates theTransportStateReferenceof this accepted or opened TLS connection.- Returns:
trueif the peer has been authenticated and the message received on this connection may be dispatched,falseif the peer certificate could not be verified. In the latter case the TLS session has been invalidated and the caller must not dispatch the message, but close the connection instead (RFC 6353 ยง5.3.2).- Since:
- 3.13.0 (returns a boolean, was
voidbefore)
-
setInAppBuffer
-
getInAppBuffer
-
isHandshakeFinished
public boolean isHandshakeFinished()- Overrides:
isHandshakeFinishedin classAbstractServerSocket<TcpAddress>
-
setHandshakeFinished
public void setHandshakeFinished(boolean handshakeFinished) - Overrides:
setHandshakeFinishedin classAbstractServerSocket<TcpAddress>
-
isAppOutPending
public boolean isAppOutPending() -
getSessionID
Description copied from class:AbstractSocketEntryGets the unique identifier of the associated (TLS) session.- Specified by:
getSessionIDin classAbstractSocketEntry<TcpAddress>- Returns:
- a session identifier.
-
closeSession
public void closeSession()Description copied from class:AbstractSocketEntryClose the (TLS) session associated with the socket entry.- Specified by:
closeSessionin classAbstractSocketEntry<TcpAddress>
-