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 ConnectionObserverINSTANCE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconnectionClosed()Callback when the connection is closed.voidconnectionClosed(java.lang.Throwable error)Callback when the connection is closed due to anerror.ConnectionObserver.DataObserverconnectionEstablished(ConnectionInfo info)Callback when a non-multiplexed connection is established and ready.ConnectionObserver.MultiplexedObservermultiplexedConnectionEstablished(ConnectionInfo info)Callback when a multiplexed connection is established and ready.voidonDataRead(int size)Callback whensizebytes are read from the connection.voidonDataWrite(int size)Callback whensizebytes are written to the connection.voidonFlush()Callback when previously written data is flushed to the connection.ConnectionObserver.SecurityHandshakeObserveronSecurityHandshake()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:ConnectionObserverCallback whensizebytes are read from the connection.- Specified by:
onDataReadin interfaceConnectionObserver- Parameters:
size- size of the data chunk read
-
onDataWrite
public void onDataWrite(int size)
Description copied from interface:ConnectionObserverCallback whensizebytes are written to the connection.- Specified by:
onDataWritein interfaceConnectionObserver- Parameters:
size- size of the data chunk written
-
onFlush
public void onFlush()
Description copied from interface:ConnectionObserverCallback when previously written data is flushed to the connection.- Specified by:
onFlushin interfaceConnectionObserver
-
onSecurityHandshake
public ConnectionObserver.SecurityHandshakeObserver onSecurityHandshake()
Description copied from interface:ConnectionObserverCallback when a security handshake is initiated.- Specified by:
onSecurityHandshakein interfaceConnectionObserver- Returns:
- a new
ConnectionObserver.SecurityHandshakeObserverthat provides visibility into security handshake events
-
connectionEstablished
public ConnectionObserver.DataObserver connectionEstablished(ConnectionInfo info)
Description copied from interface:ConnectionObserverCallback when a non-multiplexed connection is established and ready.- Specified by:
connectionEstablishedin interfaceConnectionObserver- Parameters:
info-ConnectionInfofor the established connection- Returns:
- a new
ConnectionObserver.DataObserverthat provides visibility into read and write events
-
multiplexedConnectionEstablished
public ConnectionObserver.MultiplexedObserver multiplexedConnectionEstablished(ConnectionInfo info)
Description copied from interface:ConnectionObserverCallback when a multiplexed connection is established and ready.- Specified by:
multiplexedConnectionEstablishedin interfaceConnectionObserver- Parameters:
info-ConnectionInfofor the established connection- Returns:
- a new
ConnectionObserver.MultiplexedObserverthat provides visibility into new streams
-
connectionClosed
public void connectionClosed(java.lang.Throwable error)
Description copied from interface:ConnectionObserverCallback when the connection is closed due to anerror.- Specified by:
connectionClosedin interfaceConnectionObserver- Parameters:
error- an occurred error
-
connectionClosed
public void connectionClosed()
Description copied from interface:ConnectionObserverCallback when the connection is closed.- Specified by:
connectionClosedin interfaceConnectionObserver
-
-