public final class HttpServerEventPublisher extends HttpServerEventsListener implements io.reactivex.netty.events.EventSource<HttpServerEventsListener>, io.reactivex.netty.events.EventPublisher
| Constructor and Description |
|---|
HttpServerEventPublisher(io.reactivex.netty.protocol.tcp.server.events.TcpServerEventPublisher tcpDelegate) |
HttpServerEventPublisher(io.reactivex.netty.protocol.tcp.server.events.TcpServerEventPublisher tcpDelegate,
io.reactivex.netty.events.ListenersHolder<HttpServerEventsListener> l) |
| Modifier and Type | Method and Description |
|---|---|
HttpServerEventPublisher |
copy(io.reactivex.netty.protocol.tcp.server.events.TcpServerEventPublisher newTcpDelegate) |
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) |
void |
onConnectionHandlingStart(long duration,
java.util.concurrent.TimeUnit timeUnit) |
void |
onConnectionHandlingSuccess(long duration,
java.util.concurrent.TimeUnit timeUnit) |
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() |
void |
onNewRequestReceived()
Event whenever a new request is received by the server.
|
void |
onRequestContentReceived()
Event whenever an HTTP request content is received (an HTTP request can have multiple content chunks, in which
case this event will be fired as many times for the same request).
|
void |
onRequestHandlingFailed(long duration,
java.util.concurrent.TimeUnit timeUnit,
java.lang.Throwable throwable)
When request handling completes with an error.
|
void |
onRequestHandlingStart(long duration,
java.util.concurrent.TimeUnit timeUnit)
When request handling started.
|
void |
onRequestHandlingSuccess(long duration,
java.util.concurrent.TimeUnit timeUnit)
When request handling completes successfully.
|
void |
onRequestHeadersReceived()
Whenever request headers are received.
|
void |
onRequestReceiveComplete(long duration,
java.util.concurrent.TimeUnit timeUnit)
Event when the request receive is completed.
|
void |
onResponseWriteFailed(long duration,
java.util.concurrent.TimeUnit timeUnit,
java.lang.Throwable throwable)
Event when the response write is completed with an error.
|
void |
onResponseWriteStart()
Event when the response write starts.
|
void |
onResponseWriteSuccess(long duration,
java.util.concurrent.TimeUnit timeUnit,
int responseCode)
Event when the response write is completed successfully.
|
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(HttpServerEventsListener listener) |
public HttpServerEventPublisher(io.reactivex.netty.protocol.tcp.server.events.TcpServerEventPublisher tcpDelegate)
public HttpServerEventPublisher(io.reactivex.netty.protocol.tcp.server.events.TcpServerEventPublisher tcpDelegate,
io.reactivex.netty.events.ListenersHolder<HttpServerEventsListener> l)
public void onNewRequestReceived()
HttpServerEventsListeneronNewRequestReceived in class HttpServerEventsListenerpublic void onRequestHandlingStart(long duration,
java.util.concurrent.TimeUnit timeUnit)
HttpServerEventsListeneronRequestHandlingStart in class HttpServerEventsListenerduration - Time between the receiving request and start of processing.timeUnit - Time unit for the duration.public void onRequestHandlingSuccess(long duration,
java.util.concurrent.TimeUnit timeUnit)
HttpServerEventsListeneronRequestHandlingSuccess in class HttpServerEventsListenerduration - Time between the request processing start and completion.timeUnit - Time unit for the duration.public void onRequestHandlingFailed(long duration,
java.util.concurrent.TimeUnit timeUnit,
java.lang.Throwable throwable)
HttpServerEventsListeneronRequestHandlingFailed in class HttpServerEventsListenerduration - Time between the request processing start and failure.timeUnit - Time unit for the duration.throwable - Error that caused the failure.public void onRequestHeadersReceived()
HttpServerEventsListeneronRequestHeadersReceived in class HttpServerEventsListenerpublic void onRequestContentReceived()
HttpServerEventsListeneronRequestContentReceived in class HttpServerEventsListenerpublic void onRequestReceiveComplete(long duration,
java.util.concurrent.TimeUnit timeUnit)
HttpServerEventsListeneronRequestReceiveComplete in class HttpServerEventsListenerduration - Time taken between receiving the request headers and completion of request.timeUnit - Time unit for the duration.public void onResponseWriteStart()
HttpServerEventsListeneronResponseWriteStart in class HttpServerEventsListenerpublic void onResponseWriteSuccess(long duration,
java.util.concurrent.TimeUnit timeUnit,
int responseCode)
HttpServerEventsListeneronResponseWriteSuccess in class HttpServerEventsListenerduration - Time taken between write start and completion.timeUnit - Time unit for the duration.responseCode - HTTP response code for the response.public void onResponseWriteFailed(long duration,
java.util.concurrent.TimeUnit timeUnit,
java.lang.Throwable throwable)
HttpServerEventsListeneronResponseWriteFailed in class HttpServerEventsListenerduration - Time taken between write start and completion.timeUnit - Time unit for the duration.throwable - Error that caused the failure.public void onConnectionCloseFailed(long duration,
java.util.concurrent.TimeUnit timeUnit,
java.lang.Throwable throwable)
onConnectionCloseFailed in class io.reactivex.netty.channel.events.ConnectionEventListenerpublic void onConnectionCloseSuccess(long duration,
java.util.concurrent.TimeUnit timeUnit)
onConnectionCloseSuccess in class io.reactivex.netty.channel.events.ConnectionEventListenerpublic void onConnectionCloseStart()
onConnectionCloseStart in class io.reactivex.netty.channel.events.ConnectionEventListenerpublic void onWriteFailed(long duration,
java.util.concurrent.TimeUnit timeUnit,
java.lang.Throwable throwable)
onWriteFailed in class io.reactivex.netty.channel.events.ConnectionEventListenerpublic void onWriteSuccess(long duration,
java.util.concurrent.TimeUnit timeUnit)
onWriteSuccess in class io.reactivex.netty.channel.events.ConnectionEventListenerpublic void onWriteStart()
onWriteStart in class io.reactivex.netty.channel.events.ConnectionEventListenerpublic void onFlushComplete(long duration,
java.util.concurrent.TimeUnit timeUnit)
onFlushComplete in class io.reactivex.netty.channel.events.ConnectionEventListenerpublic void onFlushStart()
onFlushStart in class io.reactivex.netty.channel.events.ConnectionEventListenerpublic void onByteRead(long bytesRead)
onByteRead in class io.reactivex.netty.channel.events.ConnectionEventListenerpublic void onByteWritten(long bytesWritten)
onByteWritten in class io.reactivex.netty.channel.events.ConnectionEventListenerpublic void onConnectionHandlingFailed(long duration,
java.util.concurrent.TimeUnit timeUnit,
java.lang.Throwable throwable)
onConnectionHandlingFailed in class io.reactivex.netty.protocol.tcp.server.events.TcpServerEventListenerpublic void onConnectionHandlingSuccess(long duration,
java.util.concurrent.TimeUnit timeUnit)
onConnectionHandlingSuccess in class io.reactivex.netty.protocol.tcp.server.events.TcpServerEventListenerpublic void onConnectionHandlingStart(long duration,
java.util.concurrent.TimeUnit timeUnit)
onConnectionHandlingStart in class io.reactivex.netty.protocol.tcp.server.events.TcpServerEventListenerpublic void onCustomEvent(java.lang.Object event)
onCustomEvent in interface io.reactivex.netty.events.EventListeneronCustomEvent in class io.reactivex.netty.channel.events.ConnectionEventListenerpublic void onCustomEvent(java.lang.Object event,
long duration,
java.util.concurrent.TimeUnit timeUnit)
onCustomEvent in interface io.reactivex.netty.events.EventListeneronCustomEvent in class io.reactivex.netty.channel.events.ConnectionEventListenerpublic void onCustomEvent(java.lang.Object event,
long duration,
java.util.concurrent.TimeUnit timeUnit,
java.lang.Throwable throwable)
onCustomEvent in interface io.reactivex.netty.events.EventListeneronCustomEvent in class io.reactivex.netty.channel.events.ConnectionEventListenerpublic void onCustomEvent(java.lang.Object event,
java.lang.Throwable throwable)
onCustomEvent in interface io.reactivex.netty.events.EventListeneronCustomEvent in class io.reactivex.netty.channel.events.ConnectionEventListenerpublic void onNewClientConnected()
onNewClientConnected in class io.reactivex.netty.protocol.tcp.server.events.TcpServerEventListenerpublic boolean publishingEnabled()
publishingEnabled in interface io.reactivex.netty.events.EventPublisherpublic rx.Subscription subscribe(HttpServerEventsListener listener)
subscribe in interface io.reactivex.netty.events.EventSource<HttpServerEventsListener>public HttpServerEventPublisher copy(io.reactivex.netty.protocol.tcp.server.events.TcpServerEventPublisher newTcpDelegate)