Class ProtocolHandlers
java.lang.Object
org.eclipse.jetty.client.ProtocolHandlers
- All Implemented Interfaces:
Dumpable
A container for ProtocolHandlers accessible from HttpClient.getProtocolHandlers().
-
Nested Class Summary
Nested classes/interfaces inherited from interface Dumpable
Dumpable.DumpableContainer -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Removes all protocol handlers from this container.dump()voiddump(Appendable out, String indent) Dump this object (and children) into an Appendable using the provided indent after any new lines.Finds the first protocol handler thatacceptsthe given request and response.put(ProtocolHandler protocolHandler) Stores the givenprotocolHandlerin this container.Removes the protocol handler with the given name.
-
Constructor Details
-
ProtocolHandlers
protected ProtocolHandlers()
-
-
Method Details
-
put
Stores the given
protocolHandlerin this container.If a protocol handler with the same name exists, it is replaced by the given one, and the existing returned.
- Parameters:
protocolHandler- the protocol handler to store- Returns:
- the existing protocol handler with the same name, or null if no protocol handler with that name was already stored
- See Also:
-
remove
Removes the protocol handler with the given name.
- Parameters:
name- the name of the protocol handler to remove- Returns:
- the removed protocol handler, or null if no protocol handler with that name was already stored
- See Also:
-
clear
public void clear()Removes all protocol handlers from this container.
-
find
Finds the first protocol handler that
acceptsthe given request and response.- Parameters:
request- the request to acceptresponse- the response to accept- Returns:
- the protocol handler that accepted the request and response, or null if none of the protocol handlers accepted the request and response
-
dump
-
dump
Description copied from interface:DumpableDump this object (and children) into an Appendable using the provided indent after any new lines. The indent should not be applied to the first object dumped.- Specified by:
dumpin interfaceDumpable- Parameters:
out- The appendable to dump toindent- The indent to apply after any new lines.- Throws:
IOException- if unable to write to Appendable
-