public interface IRequestListener extends IRequestHeaderListener, IRequestBodyListener
IHttpConversation
object.
The usage of this listener implies that implementors might have to prepare the data to make it available in this listener. Keep in mind that the
methods of this class are invoked from a thread that
is managed by the Executor
passed to HttpConversationManager
. Some implementations for example might read from a database or from
the file system which means that it's enough for
them to allocate the necessary resources within this listener (and not when the conversation is started using IHttpConversation.start()
).
Implementations have to be prepared that the request sending methods might be called multiple times within a single conversation, depending on whether the conversation is restarted by response filters.
An instance of this type may be added to a conversation via the IHttpConversation.setRequestListener(IRequestListener)
method. For
convenience, consider using the IHttpConversation.setRequestListener(IRequestBodyListener)
overload that accepts a IRequestBodyListener
instead. This one has a single method that allows it to be used with Java 8 lambdas.
onRequestHeaderSending
onRequestBodySending