java.lang.Object
org.eclipse.jetty.util.AttributesMap
org.eclipse.jetty.client.HttpConversation
- All Implemented Interfaces:
org.eclipse.jetty.util.Attributes,org.eclipse.jetty.util.component.Dumpable
public class HttpConversation
extends org.eclipse.jetty.util.AttributesMap
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.Attributes
org.eclipse.jetty.util.Attributes.Layer, org.eclipse.jetty.util.Attributes.Lazy, org.eclipse.jetty.util.Attributes.Mapped, org.eclipse.jetty.util.Attributes.WrapperNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
org.eclipse.jetty.util.component.Dumpable.DumpableContainer -
Field Summary
Fields inherited from interface org.eclipse.jetty.util.Attributes
NULLFields inherited from interface org.eclipse.jetty.util.component.Dumpable
KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidReturns the list of response listeners that needs to be notified of response events.longReturns the total timeout for the conversation.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 org.eclipse.jetty.util.AttributesMap
addAll, clearAttributes, dump, dump, getAttribute, getAttributeEntrySet, getAttributeNamesCopy, getAttributeNameSet, getAttributeNameSetCopy, removeAttribute, setAttribute, sizeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.jetty.util.Attributes
asAttributeMapMethods inherited from interface org.eclipse.jetty.util.component.Dumpable
dumpSelf
-
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
-
getTimeout
public long getTimeout()Returns the total timeout for the conversation.
The conversation total timeout is the total timeout of the first request in the conversation.
- Returns:
- the total timeout of the conversation
- See Also:
-
abort
-
toString
- Overrides:
toStringin classorg.eclipse.jetty.util.AttributesMap
-