Package org.apache.pekko.io
Interface Tcp.ConnectionClosed
- All Superinterfaces:
DeadLetterSuppression,NoSerializationVerificationNeeded,Tcp.Event,Tcp.Message
- All Known Implementing Classes:
Tcp.Aborted$,Tcp.Closed$,Tcp.ConfirmedClosed$,Tcp.ErrorClosed,Tcp.PeerClosed$
- Enclosing class:
- Tcp
This is the common interface for all events which indicate that a connection
has been closed or half-closed.
-
Method Summary
Modifier and TypeMethodDescriptionIfisErrorClosedreturns true, then the error condition can be retrieved by this method.booleantrueiff the connection has been closed in response to anAbortcommand.booleantrueiff the connection has been fully closed in response to aConfirmedClosecommand.booleantrueiff the connection has been closed due to an IO error.booleantrueiff the connection has been closed by the peer; in casekeepOpenOnPeerClosedis in effect as per theTcp.Registercommand, this connection’s reading half is now closed.
-
Method Details
-
getErrorCause
String getErrorCause()IfisErrorClosedreturns true, then the error condition can be retrieved by this method. -
isAborted
boolean isAborted()trueiff the connection has been closed in response to anAbortcommand. -
isConfirmed
boolean isConfirmed()trueiff the connection has been fully closed in response to aConfirmedClosecommand. -
isErrorClosed
boolean isErrorClosed()trueiff the connection has been closed due to an IO error. -
isPeerClosed
boolean isPeerClosed()trueiff the connection has been closed by the peer; in casekeepOpenOnPeerClosedis in effect as per theTcp.Registercommand, this connection’s reading half is now closed.
-