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 org.eclipse.jetty.util.Attributes
Attributes.Layer, Attributes.Lazy, Attributes.Mapped, Attributes.Synthetic, Attributes.Wrapper
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
Dumpable.DumpableContainer
-
Field Summary
Fields inherited from interface org.eclipse.jetty.util.Attributes
NULL
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Returns the list of response listeners that needs to be notified of response events.long
Returns the total timeout for the conversation.toString()
void
updateResponseListeners
(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 org.eclipse.jetty.util.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
AuthenticationProtocolHandler
stores the successful authentication credentials while theRedirectProtocolHandler
performs 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:
toString
in classAttributes.Lazy
-