public class ProtocolHandlers extends Object implements Dumpable
A container for ProtocolHandlers accessible from HttpClient.getProtocolHandlers().
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Removes all protocol handlers from this container.
|
String |
dump() |
void |
dump(Appendable out,
String indent)
Dump this object (and children) into an Appendable using the provided indent after any new lines.
|
ProtocolHandler |
find(Request request,
Response response)
Finds the first protocol handler that
accepts
the given request and response. |
ProtocolHandler |
put(ProtocolHandler protocolHandler)
Stores the given
protocolHandler in this container. |
ProtocolHandler |
remove(String name)
Removes the protocol handler with the given name.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdump, dumpContainer, dumpIterable, dumpMapEntries, dumpObject, dumpObjects, dumpSelf, namedpublic ProtocolHandler put(ProtocolHandler protocolHandler)
Stores the given protocolHandler in this container.
If a protocol handler with the same name exists, it is replaced by the given one, and the existing returned.
protocolHandler - the protocol handler to storeremove(String)public ProtocolHandler remove(String name)
Removes the protocol handler with the given name.
name - the name of the protocol handler to removeput(ProtocolHandler),
clear()public void clear()
Removes all protocol handlers from this container.
public ProtocolHandler find(Request request, Response response)
Finds the first protocol handler that
accepts
the given request and response.
request - the request to acceptresponse - the response to acceptpublic void dump(Appendable out, String indent) throws IOException
Dumpabledump in interface Dumpableout - The appendable to dump toindent - The indent to apply after any new lines.IOException - if unable to write to AppendableCopyright © 2010 - 2020 Adobe. All Rights Reserved