Class NoProxySelector
- java.lang.Object
-
- java.net.ProxySelector
-
- com.github.markusbernhardt.proxy.selector.direct.NoProxySelector
-
public class NoProxySelector extends java.net.ProxySelector
This proxy selector will always return a "DIRECT" proxy. Implemented as singleton.
-
-
Field Summary
Fields Modifier and Type Field Description private static NoProxySelector
instance
-
Constructor Summary
Constructors Modifier Constructor Description private
NoProxySelector()
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
connectFailed(java.net.URI uri, java.net.SocketAddress sa, java.io.IOException ioe)
connectFailedstatic NoProxySelector
getInstance()
Gets the one and only instance of this selector.java.util.List<java.net.Proxy>
select(java.net.URI uri)
selectjava.lang.String
toString()
-
-
-
Field Detail
-
instance
private static NoProxySelector instance
-
-
Method Detail
-
getInstance
public static NoProxySelector getInstance()
Gets the one and only instance of this selector.- Returns:
- a DirectSelector.
-
connectFailed
public void connectFailed(java.net.URI uri, java.net.SocketAddress sa, java.io.IOException ioe)
connectFailed- Specified by:
connectFailed
in classjava.net.ProxySelector
- See Also:
ProxySelector.connectFailed(java.net.URI, java.net.SocketAddress, java.io.IOException)
-
select
public java.util.List<java.net.Proxy> select(java.net.URI uri)
select- Specified by:
select
in classjava.net.ProxySelector
- See Also:
ProxySelector.select(java.net.URI)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-