public class ProtocolHandlers extends Object
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.
|
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.
|
public 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 acceptCopyright © 1995–2017 Webtide. All rights reserved.