public class ProtocolHandlers extends java.lang.Object implements Dumpable
A container for ProtocolHandlers accessible from HttpClient.getProtocolHandlers().
| Modifier | Constructor and Description |
|---|---|
protected |
ProtocolHandlers() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Removes all protocol handlers from this container.
|
java.lang.String |
dump() |
void |
dump(java.lang.Appendable out,
java.lang.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(java.lang.String name)
Removes the protocol handler with the given name.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdump, dumpObject, dumpObjects, dumpSelfpublic 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(java.lang.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(java.lang.Appendable out,
java.lang.String indent)
throws java.io.IOException
DumpableCopyright © 1995–2023 Webtide. All rights reserved.