public class ProtocolDispatchSelector extends ProxySelector
| Constructor and Description |
|---|
ProtocolDispatchSelector()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
connectFailed(URI uri,
SocketAddress sa,
IOException ioe)
connectFailed
|
ProxySelector |
getSelector(String protocol)
Gets the selector installed for the given protocol.
|
ProxySelector |
removeSelector(String protocol)
Removes the selector installed for the given protocol.
|
List<Proxy> |
select(URI uri)
select
|
void |
setFallbackSelector(ProxySelector selector)
Sets the fallback selector that is always called when no matching
protocol selector was found..
|
void |
setSelector(String protocol,
ProxySelector selector)
Sets a selector responsible for the given protocol.
|
int |
size()
Gets the size of the selector map.
|
String |
toString() |
getDefault, setDefaultpublic void setSelector(String protocol, ProxySelector selector)
protocol - the name of the protocol.selector - the selector to use.public ProxySelector removeSelector(String protocol)
protocol - the protocol name.public ProxySelector getSelector(String protocol)
protocol - the protocol name.public void setFallbackSelector(ProxySelector selector)
selector - the selector to use.public void connectFailed(URI uri, SocketAddress sa, IOException ioe)
connectFailed in class ProxySelectorProxySelector.connectFailed(java.net.URI,
java.net.SocketAddress, java.io.IOException)public List<Proxy> select(URI uri)
select in class ProxySelectorProxySelector.select(java.net.URI)public int size()
Copyright © 2023. All rights reserved.