Class NoopTransportObserver.NoopConnectionObserver
- java.lang.Object
-
- io.servicetalk.transport.netty.internal.NoopTransportObserver.NoopConnectionObserver
-
- All Implemented Interfaces:
ConnectionObserver
- Enclosing class:
- NoopTransportObserver
public static final class NoopTransportObserver.NoopConnectionObserver extends java.lang.Object implements ConnectionObserver
Noop version ofConnectionObserver
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.servicetalk.transport.api.ConnectionObserver
ConnectionObserver.DataObserver, ConnectionObserver.MultiplexedObserver, ConnectionObserver.ReadObserver, ConnectionObserver.SecurityHandshakeObserver, ConnectionObserver.StreamObserver, ConnectionObserver.WriteObserver
-
-
Field Summary
Fields Modifier and Type Field Description static ConnectionObserver
INSTANCE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
connectionClosed()
Callback when the connection is closed.void
connectionClosed(java.lang.Throwable error)
Callback when the connection is closed due to anerror
.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 whensize
bytes are read from the connection.void
onDataWrite(int size)
Callback whensize
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.
-
-
-
Field Detail
-
INSTANCE
public static final ConnectionObserver INSTANCE
-
-
Method Detail
-
onDataRead
public void onDataRead(int size)
Description copied from interface:ConnectionObserver
Callback whensize
bytes are read from the connection.- Specified by:
onDataRead
in interfaceConnectionObserver
- Parameters:
size
- size of the data chunk read
-
onDataWrite
public void onDataWrite(int size)
Description copied from interface:ConnectionObserver
Callback whensize
bytes are written to the connection.- Specified by:
onDataWrite
in interfaceConnectionObserver
- Parameters:
size
- size of the data chunk written
-
onFlush
public void onFlush()
Description copied from interface:ConnectionObserver
Callback when previously written data is flushed to the connection.- Specified by:
onFlush
in interfaceConnectionObserver
-
onSecurityHandshake
public ConnectionObserver.SecurityHandshakeObserver onSecurityHandshake()
Description copied from interface:ConnectionObserver
Callback when a security handshake is initiated.- Specified by:
onSecurityHandshake
in interfaceConnectionObserver
- Returns:
- a new
ConnectionObserver.SecurityHandshakeObserver
that provides visibility into security handshake events
-
connectionEstablished
public ConnectionObserver.DataObserver connectionEstablished(ConnectionInfo info)
Description copied from interface:ConnectionObserver
Callback when a non-multiplexed connection is established and ready.- Specified by:
connectionEstablished
in interfaceConnectionObserver
- Parameters:
info
-ConnectionInfo
for the established connection- Returns:
- a new
ConnectionObserver.DataObserver
that provides visibility into read and write events
-
multiplexedConnectionEstablished
public ConnectionObserver.MultiplexedObserver multiplexedConnectionEstablished(ConnectionInfo info)
Description copied from interface:ConnectionObserver
Callback when a multiplexed connection is established and ready.- Specified by:
multiplexedConnectionEstablished
in interfaceConnectionObserver
- Parameters:
info
-ConnectionInfo
for the established connection- Returns:
- a new
ConnectionObserver.MultiplexedObserver
that provides visibility into new streams
-
connectionClosed
public void connectionClosed(java.lang.Throwable error)
Description copied from interface:ConnectionObserver
Callback when the connection is closed due to anerror
.- Specified by:
connectionClosed
in interfaceConnectionObserver
- Parameters:
error
- an occurred error
-
connectionClosed
public void connectionClosed()
Description copied from interface:ConnectionObserver
Callback when the connection is closed.- Specified by:
connectionClosed
in interfaceConnectionObserver
-
-