Interface StateTrackingHandler.Listener
- All Superinterfaces:
 EventListener
- Enclosing class:
 StateTrackingHandler
Listener of events emitted by StateTrackingHandler.
The methods of this interface are named after the wrong API usages
tracked by StateTrackingHandler.
- 
Method Summary
Modifier and TypeMethodDescriptiondefault voidonDemandCallbackBlocked(Request request, StateTrackingHandler.ThreadInfo demandThreadInfo, StateTrackingHandler.ThreadInfo runThreadInfo) Invoked when therequest demand callbackrun()method blocks for longer than the timeout specified withStateTrackingHandler.getDemandCallbackTimeout().default voidonHandlerCallbackNotCompleted(Request request, StateTrackingHandler.ThreadInfo handlerThreadInfo) Invoked when theHandlercallback is not completed within the timeout specified withStateTrackingHandler.getHandlerCallbackTimeout().default voidonHandlerException(Request request, Throwable failure, StateTrackingHandler.ThreadInfo completionThreadInfo) Invoked when theHandlerchain throws an exception from theRequest.Handler.handle(Request, Response, Callback)method.default voidonInvalidHandlerReturnValue(Request request, StateTrackingHandler.ThreadInfo completionThreadInfo) Invoked when theHandlerchain returnsfalse, but the handler callback has been completed.default voidonWriteBlocked(Request request, StateTrackingHandler.ThreadInfo writeThreadInfo, StateTrackingHandler.ThreadInfo writingThreadInfo) Invoked when theResponse.write(boolean, ByteBuffer, Callback)call blocks for longer than the timeout specified withStateTrackingHandler.getWriteTimeout().default voidonWriteCallbackBlocked(Request request, Throwable writeFailure, StateTrackingHandler.ThreadInfo writeThreadInfo, StateTrackingHandler.ThreadInfo callbackThreadInfo) Invoked when the write callback passed toResponse.write(boolean, ByteBuffer, Callback)blocks for longer than the timeout specified withStateTrackingHandler.getWriteCallbackTimeout().default voidonWriteCallbackNotCompleted(Request request, Throwable writeFailure, StateTrackingHandler.ThreadInfo writeThreadInfo) Invoked when the write callback passed toResponse.write(boolean, ByteBuffer, Callback)is not completed for longer than the timeout specified withStateTrackingHandler.getWriteTimeout(). 
- 
Method Details
- 
onInvalidHandlerReturnValue
default void onInvalidHandlerReturnValue(Request request, StateTrackingHandler.ThreadInfo completionThreadInfo) Invoked when the
Handlerchain returnsfalse, but the handler callback has been completed.This event is always enabled.
- Parameters:
 request- the current requestcompletionThreadInfo- theStateTrackingHandler.ThreadInfoof the thread that completed the handler callback
 - 
onHandlerException
default void onHandlerException(Request request, Throwable failure, StateTrackingHandler.ThreadInfo completionThreadInfo) Invoked when the
Handlerchain throws an exception from theRequest.Handler.handle(Request, Response, Callback)method.This event is always enabled.
- Parameters:
 request- the current requestfailure- the exception throwncompletionThreadInfo- theStateTrackingHandler.ThreadInfoof the thread that completed the handler callback, ornullif the handler callback has not been completed
 - 
onHandlerCallbackNotCompleted
default void onHandlerCallbackNotCompleted(Request request, StateTrackingHandler.ThreadInfo handlerThreadInfo) Invoked when the
Handlercallback is not completed within the timeout specified withStateTrackingHandler.getHandlerCallbackTimeout().This event is enabled only when
StateTrackingHandler.getHandlerCallbackTimeout()is non-null.When handler thread has already returned from the handler chain, the thread info parameter is
null. Otherwise, the handler thread has not returned yet and may be blocked, and the thread info parameter is notnull.Note: when present, the thread info stack trace may not be accurate, as the thread blockage might have resolved just before the thread info was taken.
- Parameters:
 request- the current requesthandlerThreadInfo- the handler thread info, ornullif the handler thread already returned from the handler chain
 - 
onDemandCallbackBlocked
default void onDemandCallbackBlocked(Request request, StateTrackingHandler.ThreadInfo demandThreadInfo, StateTrackingHandler.ThreadInfo runThreadInfo) Invoked when the
request demand callbackrun()method blocks for longer than the timeout specified withStateTrackingHandler.getDemandCallbackTimeout().This event is enabled only when
StateTrackingHandler.getDemandCallbackTimeout()is non-null.Note: the thread info stack trace of the thread that is running the demand callback may not be accurate, as the thread blockage might have resolved just before the thread info was taken.
- Parameters:
 request- the current requestdemandThreadInfo- the thread info of the thread that calledRequest.demand(Runnable)runThreadInfo- the thread info of the thread running the demand callback
 - 
onWriteBlocked
default void onWriteBlocked(Request request, StateTrackingHandler.ThreadInfo writeThreadInfo, StateTrackingHandler.ThreadInfo writingThreadInfo) Invoked when the
Response.write(boolean, ByteBuffer, Callback)call blocks for longer than the timeout specified withStateTrackingHandler.getWriteTimeout().This event is enabled only when
StateTrackingHandler.getWriteTimeout()is non-null.Note: the thread info stack trace of the thread that is writing may not be accurate, as the thread blockage might have resolved just before the thread info was taken.
- Parameters:
 request- the current requestwriteThreadInfo- the thread info of the thread that calledResponse.write(boolean, ByteBuffer, Callback)writingThreadInfo- the thread info of the thread tht is writing
 - 
onWriteCallbackNotCompleted
default void onWriteCallbackNotCompleted(Request request, Throwable writeFailure, StateTrackingHandler.ThreadInfo writeThreadInfo) Invoked when the write callback passed to
Response.write(boolean, ByteBuffer, Callback)is not completed for longer than the timeout specified withStateTrackingHandler.getWriteTimeout().This event is enabled only when
StateTrackingHandler.getWriteTimeout()is non-null.Note that the write might have been fully performed, but since the callback is not completed, this case is indistinguishable from the case where the callback is not complete because the write has not been fully performed.
- Parameters:
 request- the current requestwriteFailure- the write failure, ornullif the write succeededwriteThreadInfo- the thread info of the thread that calledResponse.write(boolean, ByteBuffer, Callback)
 - 
onWriteCallbackBlocked
default void onWriteCallbackBlocked(Request request, Throwable writeFailure, StateTrackingHandler.ThreadInfo writeThreadInfo, StateTrackingHandler.ThreadInfo callbackThreadInfo) Invoked when the write callback passed to
Response.write(boolean, ByteBuffer, Callback)blocks for longer than the timeout specified withStateTrackingHandler.getWriteCallbackTimeout().This event is enabled only when
StateTrackingHandler.getWriteCallbackTimeout()is non-null.Note: the thread info stack trace of the thread that is running the write callback may not be accurate, as the thread blockage might have resolved just before the thread info was taken.
- Parameters:
 request- the current requestwriteFailure- the write failure, ornullif the write succeededwriteThreadInfo- the thread info of the thread that calledResponse.write(boolean, ByteBuffer, Callback)callbackThreadInfo- the thread info of the thread invoking the write callback
 
 -