Class HttpConversation
java.lang.Object
org.eclipse.jetty.util.AttributesMap
org.eclipse.jetty.client.HttpConversation
- All Implemented Interfaces:
Attributes, Dumpable
-
Nested Class Summary
Nested classes/interfaces inherited from interface Attributes
Attributes.WrapperNested classes/interfaces inherited from interface Dumpable
Dumpable.DumpableContainer -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Deque<HttpExchange> private List<Response.ResponseListener> private static final Logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the list of response listeners that needs to be notified of response events.toString()voidupdateResponseListeners(Response.ResponseListener overrideListener) Requests to update the response listener, eventually using the given override response listener, that must be notified instead of the first exchange response listeners.Methods inherited from class AttributesMap
addAll, clearAttributes, dump, dump, getAttribute, getAttributeEntrySet, getAttributeNames, getAttributeNamesCopy, getAttributeNameSet, removeAttribute, setAttribute, size
-
Field Details
-
LOG
-
exchanges
-
listeners
-
-
Constructor Details
-
HttpConversation
public HttpConversation()
-
-
Method Details
-
getExchanges
-
getResponseListeners
Returns the list of response listeners that needs to be notified of response events. This list changes as the conversation proceeds, as follows:-
request R1 send => conversation.updateResponseListeners(null)
- exchanges in conversation: E1
- listeners to be notified: E1.listeners
-
response R1 arrived, 401 => conversation.updateResponseListeners(AuthenticationProtocolHandler.listener)
- exchanges in conversation: E1
- listeners to be notified: AuthenticationProtocolHandler.listener
-
request R2 send => conversation.updateResponseListeners(null)
- exchanges in conversation: E1 + E2
- listeners to be notified: E2.listeners + E1.listeners
-
response R2 arrived, 302 => conversation.updateResponseListeners(RedirectProtocolHandler.listener)
- exchanges in conversation: E1 + E2
- listeners to be notified: E2.listeners + RedirectProtocolHandler.listener
-
request R3 send => conversation.updateResponseListeners(null)
- exchanges in conversation: E1 + E2 + E3
- listeners to be notified: E3.listeners + E1.listeners
-
response R3 arrived, 200 => conversation.updateResponseListeners(null)
- exchanges in conversation: E1 + E2 + E3
- listeners to be notified: E3.listeners + E1.listeners
AuthenticationProtocolHandlerstores the successful authentication credentials while theRedirectProtocolHandlerperforms a redirect).- Returns:
- the list of response listeners that needs to be notified of response events
-
request R1 send => conversation.updateResponseListeners(null)
-
updateResponseListeners
Requests to update the response listener, eventually using the given override response listener, that must be notified instead of the first exchange response listeners. This works in conjunction withgetResponseListeners(), returning the appropriate response listeners that needs to be notified of response events.- Parameters:
overrideListener- the override response listener
-
abort
-
toString
- Overrides:
toStringin classAttributesMap
-