Class HttpConversation
java.lang.Object
org.eclipse.jetty.util.Attributes.Lazy
org.eclipse.jetty.client.transport.HttpConversation
- All Implemented Interfaces:
 Attributes, Dumpable
- 
Nested Class Summary
Nested classes/interfaces inherited from interface Attributes
Attributes.Layer, Attributes.Lazy, Attributes.Mapped, Attributes.Synthetic, Attributes.WrapperNested classes/interfaces inherited from interface Dumpable
Dumpable.DumpableContainer, Dumpable.DumpAppendable - 
Field Summary
Fields inherited from interface Attributes
NULL - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanWhether the given request is in this conversation.Returns the list of response listeners that needs to be notified of response events.longReturns the total timeout for the conversation.toString()voidupdateResponseListeners(Response.Listener 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 Attributes.Lazy
addAll, asAttributeMap, clearAttributes, dump, dump, equals, getAttribute, getAttributeNameSet, hashCode, removeAttribute, setAttribute, size 
- 
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
 - 
contains
Whether the given request is in this conversation.
- Parameters:
 request- the request to test- Returns:
 - whether the given request is in this conversation
 
 - 
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 classAttributes.Lazy
 
 -