public static class IConversationFlowListener.Builder
extends java.lang.Object
IConversationFlowListener.prepareFor()
.Modifier and Type | Method and Description |
---|---|
IConversationFlowListener |
build()
Creates a new
IConversationFlowListener with the listeners configured by the various methods before this method is called. |
IConversationFlowListener.Builder |
cancellationByRequestFilter(ICancellationByRequestFilterListener cancellationByRequestFilterListener)
Sets the listener to invoke when a request filter cancels a conversation.
|
IConversationFlowListener.Builder |
cancellationByRequestListener(ICancellationByRequestListenerListener cancellationByRequestListenerListener)
Sets the listener to invoke when a request listener cancels a conversation.
|
IConversationFlowListener.Builder |
cancellationByResponseFilter(ICancellationByResponseFilterListener cancellationByResponseFilterListener)
Sets the listener to invoke when a response filter cancels a conversation.
|
IConversationFlowListener.Builder |
communicationError(ICommunicationErrorListener communicationErrorListener)
Sets the listener to invoke when a conversation runs into a low-level IO error.
|
IConversationFlowListener.Builder |
completion(IConversationCompletionListener conversationCompletionListener)
Sets the listener to invoke when a conversation completes, either successfully or with an error.
|
IConversationFlowListener.Builder |
externalCancellation(IExternalCancellationListener externalCancellationListener)
Sets the listener to invoke when a conversation is cancelled externally (i.e.
|
IConversationFlowListener.Builder |
maximumRestartsReached(IMaximumRestartsReachedListener maximumRestartsReachedListener)
Sets the listener to invoke when a conversation has been restarted too many times.
|
public IConversationFlowListener.Builder cancellationByRequestFilter(ICancellationByRequestFilterListener cancellationByRequestFilterListener)
cancellationByRequestFilterListener
- the listener to set, can be nullpublic IConversationFlowListener.Builder cancellationByRequestListener(ICancellationByRequestListenerListener cancellationByRequestListenerListener)
cancellationByRequestListenerListener
- the listener to set, can be nullpublic IConversationFlowListener.Builder cancellationByResponseFilter(ICancellationByResponseFilterListener cancellationByResponseFilterListener)
cancellationByResponseFilterListener
- the listener to set, can be nullpublic IConversationFlowListener.Builder externalCancellation(IExternalCancellationListener externalCancellationListener)
IHttpConversation.cancel()
).externalCancellationListener
- the listener to set, can be nullpublic IConversationFlowListener.Builder maximumRestartsReached(IMaximumRestartsReachedListener maximumRestartsReachedListener)
maximumRestartsReachedListener
- the listener to set, can be nullpublic IConversationFlowListener.Builder communicationError(ICommunicationErrorListener communicationErrorListener)
communicationErrorListener
- the listener to set, can be nullpublic IConversationFlowListener.Builder completion(IConversationCompletionListener conversationCompletionListener)
conversationCompletionListener
- the listener to set, can be nullpublic IConversationFlowListener build()
IConversationFlowListener
with the listeners configured by the various methods before this method is called. Any
changes to individual event listeners on this builder will not affect the set of listeners used by the returned object.
You can use a builder as many times you want. Each time this method is called it will take a snapshot of the currently configured listenerd in this instance and compose a new flow listener object using them.
Unconfigured events are simply discarded by the returned listener instance.