public static final class NoopTransportObserver.NoopConnectionObserver extends java.lang.Object implements ConnectionObserver
ConnectionObserver
.ConnectionObserver.DataObserver, ConnectionObserver.MultiplexedObserver, ConnectionObserver.ReadObserver, ConnectionObserver.SecurityHandshakeObserver, ConnectionObserver.StreamObserver, ConnectionObserver.WriteObserver
Modifier and Type | Field and Description |
---|---|
static ConnectionObserver |
INSTANCE |
Modifier and Type | Method and Description |
---|---|
void |
connectionClosed()
Callback when the connection is closed.
|
void |
connectionClosed(java.lang.Throwable error)
Callback when the connection is closed due to an
error . |
ConnectionObserver.DataObserver |
connectionEstablished(ConnectionInfo info)
Callback when a non-multiplexed connection is established and ready.
|
ConnectionObserver.MultiplexedObserver |
multiplexedConnectionEstablished(ConnectionInfo info)
Callback when a multiplexed connection is established and ready.
|
void |
onDataRead(int size)
Callback when
size bytes are read from the connection. |
void |
onDataWrite(int size)
Callback when
size bytes are written to the connection. |
void |
onFlush()
Callback when previously written data is flushed to the connection.
|
ConnectionObserver.SecurityHandshakeObserver |
onSecurityHandshake()
Callback when a security handshake is initiated.
|
public static final ConnectionObserver INSTANCE
public void onDataRead(int size)
ConnectionObserver
size
bytes are read from the connection.onDataRead
in interface ConnectionObserver
size
- size of the data chunk readpublic void onDataWrite(int size)
ConnectionObserver
size
bytes are written to the connection.onDataWrite
in interface ConnectionObserver
size
- size of the data chunk writtenpublic void onFlush()
ConnectionObserver
onFlush
in interface ConnectionObserver
public ConnectionObserver.SecurityHandshakeObserver onSecurityHandshake()
ConnectionObserver
onSecurityHandshake
in interface ConnectionObserver
ConnectionObserver.SecurityHandshakeObserver
that provides visibility into security handshake eventspublic ConnectionObserver.DataObserver connectionEstablished(ConnectionInfo info)
ConnectionObserver
connectionEstablished
in interface ConnectionObserver
info
- ConnectionInfo
for the established connectionConnectionObserver.DataObserver
that provides visibility into read and write eventspublic ConnectionObserver.MultiplexedObserver multiplexedConnectionEstablished(ConnectionInfo info)
ConnectionObserver
multiplexedConnectionEstablished
in interface ConnectionObserver
info
- ConnectionInfo
for the established connectionConnectionObserver.MultiplexedObserver
that provides visibility into new streamspublic void connectionClosed(java.lang.Throwable error)
ConnectionObserver
error
.connectionClosed
in interface ConnectionObserver
error
- an occurred errorpublic void connectionClosed()
ConnectionObserver
connectionClosed
in interface ConnectionObserver