public final class TcpServerEventPublisher extends TcpServerEventListener implements io.reactivex.netty.events.EventSource<TcpServerEventListener>, io.reactivex.netty.events.EventPublisher
Constructor and Description |
---|
TcpServerEventPublisher() |
Modifier and Type | Method and Description |
---|---|
TcpServerEventPublisher |
copy() |
void |
onByteRead(long bytesRead) |
void |
onByteWritten(long bytesWritten) |
void |
onConnectionCloseFailed(long duration,
java.util.concurrent.TimeUnit timeUnit,
java.lang.Throwable throwable) |
void |
onConnectionCloseStart() |
void |
onConnectionCloseSuccess(long duration,
java.util.concurrent.TimeUnit timeUnit) |
void |
onConnectionHandlingFailed(long duration,
java.util.concurrent.TimeUnit timeUnit,
java.lang.Throwable throwable)
Event when any connection handling completes with an error.
|
void |
onConnectionHandlingStart(long duration,
java.util.concurrent.TimeUnit timeUnit)
Event when any connection handling starts.
|
void |
onConnectionHandlingSuccess(long duration,
java.util.concurrent.TimeUnit timeUnit)
Event when any connection handling is successfully completed.
|
void |
onCustomEvent(java.lang.Object event) |
void |
onCustomEvent(java.lang.Object event,
long duration,
java.util.concurrent.TimeUnit timeUnit) |
void |
onCustomEvent(java.lang.Object event,
long duration,
java.util.concurrent.TimeUnit timeUnit,
java.lang.Throwable throwable) |
void |
onCustomEvent(java.lang.Object event,
java.lang.Throwable throwable) |
void |
onFlushComplete(long duration,
java.util.concurrent.TimeUnit timeUnit) |
void |
onFlushStart() |
void |
onNewClientConnected()
Event whenever a new client connection is accepted.
|
void |
onWriteFailed(long duration,
java.util.concurrent.TimeUnit timeUnit,
java.lang.Throwable throwable) |
void |
onWriteStart() |
void |
onWriteSuccess(long duration,
java.util.concurrent.TimeUnit timeUnit) |
boolean |
publishingEnabled() |
rx.Subscription |
subscribe(TcpServerEventListener listener) |
public void onNewClientConnected()
TcpServerEventListener
onNewClientConnected
in class TcpServerEventListener
public void onConnectionHandlingStart(long duration, java.util.concurrent.TimeUnit timeUnit)
TcpServerEventListener
onConnectionHandlingStart
in class TcpServerEventListener
duration
- Time between a client connection is accepted to when it is handled by the connection handler.timeUnit
- Time unit for the duration.public void onConnectionHandlingSuccess(long duration, java.util.concurrent.TimeUnit timeUnit)
TcpServerEventListener
onConnectionHandlingSuccess
in class TcpServerEventListener
duration
- Time taken for connection handling.timeUnit
- Time unit for the duration.public void onConnectionHandlingFailed(long duration, java.util.concurrent.TimeUnit timeUnit, java.lang.Throwable throwable)
TcpServerEventListener
onConnectionHandlingFailed
in class TcpServerEventListener
duration
- Time taken for connection handling.timeUnit
- Time unit for the duration.public void onByteRead(long bytesRead)
onByteRead
in class io.reactivex.netty.channel.events.ConnectionEventListener
public void onByteWritten(long bytesWritten)
onByteWritten
in class io.reactivex.netty.channel.events.ConnectionEventListener
public void onFlushStart()
onFlushStart
in class io.reactivex.netty.channel.events.ConnectionEventListener
public void onFlushComplete(long duration, java.util.concurrent.TimeUnit timeUnit)
onFlushComplete
in class io.reactivex.netty.channel.events.ConnectionEventListener
public void onWriteStart()
onWriteStart
in class io.reactivex.netty.channel.events.ConnectionEventListener
public void onWriteSuccess(long duration, java.util.concurrent.TimeUnit timeUnit)
onWriteSuccess
in class io.reactivex.netty.channel.events.ConnectionEventListener
public void onWriteFailed(long duration, java.util.concurrent.TimeUnit timeUnit, java.lang.Throwable throwable)
onWriteFailed
in class io.reactivex.netty.channel.events.ConnectionEventListener
public void onConnectionCloseStart()
onConnectionCloseStart
in class io.reactivex.netty.channel.events.ConnectionEventListener
public void onConnectionCloseSuccess(long duration, java.util.concurrent.TimeUnit timeUnit)
onConnectionCloseSuccess
in class io.reactivex.netty.channel.events.ConnectionEventListener
public void onConnectionCloseFailed(long duration, java.util.concurrent.TimeUnit timeUnit, java.lang.Throwable throwable)
onConnectionCloseFailed
in class io.reactivex.netty.channel.events.ConnectionEventListener
public void onCustomEvent(java.lang.Object event)
onCustomEvent
in interface io.reactivex.netty.events.EventListener
onCustomEvent
in class io.reactivex.netty.channel.events.ConnectionEventListener
public void onCustomEvent(java.lang.Object event, long duration, java.util.concurrent.TimeUnit timeUnit)
onCustomEvent
in interface io.reactivex.netty.events.EventListener
onCustomEvent
in class io.reactivex.netty.channel.events.ConnectionEventListener
public void onCustomEvent(java.lang.Object event, long duration, java.util.concurrent.TimeUnit timeUnit, java.lang.Throwable throwable)
onCustomEvent
in interface io.reactivex.netty.events.EventListener
onCustomEvent
in class io.reactivex.netty.channel.events.ConnectionEventListener
public void onCustomEvent(java.lang.Object event, java.lang.Throwable throwable)
onCustomEvent
in interface io.reactivex.netty.events.EventListener
onCustomEvent
in class io.reactivex.netty.channel.events.ConnectionEventListener
public boolean publishingEnabled()
publishingEnabled
in interface io.reactivex.netty.events.EventPublisher
public rx.Subscription subscribe(TcpServerEventListener listener)
subscribe
in interface io.reactivex.netty.events.EventSource<TcpServerEventListener>
public TcpServerEventPublisher copy()