Package org.eclipse.jetty.client
Class ProxyConfiguration.Proxy
- java.lang.Object
-
- org.eclipse.jetty.client.ProxyConfiguration.Proxy
-
- Direct Known Subclasses:
HttpProxy
,Socks4Proxy
- Enclosing class:
- ProxyConfiguration
public abstract static class ProxyConfiguration.Proxy extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private Origin.Address
address
private java.util.Set<java.lang.String>
excluded
private java.util.Set<java.lang.String>
included
private boolean
secure
private SslContextFactory.Client
sslContextFactory
-
Constructor Summary
Constructors Modifier Constructor Description protected
Proxy(Origin.Address address, boolean secure)
private
Proxy(Origin.Address address, boolean secure, SslContextFactory.Client sslContextFactory)
protected
Proxy(Origin.Address address, SslContextFactory.Client sslContextFactory)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Origin.Address
getAddress()
java.util.Set<java.lang.String>
getExcludedAddresses()
java.util.Set<java.lang.String>
getIncludedAddresses()
SslContextFactory.Client
getSslContextFactory()
java.net.URI
getURI()
boolean
isSecure()
boolean
matches(Origin origin)
Matches the givenorigin
with the included and excluded addresses, returning true if the givenorigin
is to be proxied.private boolean
matches(Origin.Address address, java.lang.String pattern)
abstract ClientConnectionFactory
newClientConnectionFactory(ClientConnectionFactory connectionFactory)
java.lang.String
toString()
-
-
-
Field Detail
-
included
private final java.util.Set<java.lang.String> included
-
excluded
private final java.util.Set<java.lang.String> excluded
-
address
private final Origin.Address address
-
secure
private final boolean secure
-
sslContextFactory
private final SslContextFactory.Client sslContextFactory
-
-
Constructor Detail
-
Proxy
protected Proxy(Origin.Address address, boolean secure)
-
Proxy
protected Proxy(Origin.Address address, SslContextFactory.Client sslContextFactory)
-
Proxy
private Proxy(Origin.Address address, boolean secure, SslContextFactory.Client sslContextFactory)
-
-
Method Detail
-
getAddress
public Origin.Address getAddress()
- Returns:
- the address of this proxy
-
isSecure
public boolean isSecure()
- Returns:
- whether the connection to the proxy must be secured via TLS
-
getSslContextFactory
public SslContextFactory.Client getSslContextFactory()
- Returns:
- the optional SslContextFactory to use when connecting to proxies
-
getIncludedAddresses
public java.util.Set<java.lang.String> getIncludedAddresses()
- Returns:
- the list of origins that must be proxied
- See Also:
matches(Origin)
,getExcludedAddresses()
-
getExcludedAddresses
public java.util.Set<java.lang.String> getExcludedAddresses()
- Returns:
- the list of origins that must not be proxied.
- See Also:
matches(Origin)
,getIncludedAddresses()
-
getURI
public java.net.URI getURI()
- Returns:
- an URI representing this proxy, or null if no URI can represent this proxy
-
matches
public boolean matches(Origin origin)
Matches the givenorigin
with the included and excluded addresses, returning true if the givenorigin
is to be proxied.- Parameters:
origin
- the origin to test for proxying- Returns:
- true if the origin must be proxied, false otherwise
-
matches
private boolean matches(Origin.Address address, java.lang.String pattern)
-
newClientConnectionFactory
public abstract ClientConnectionFactory newClientConnectionFactory(ClientConnectionFactory connectionFactory)
- Parameters:
connectionFactory
- the nestedClientConnectionFactory
- Returns:
- a new
ClientConnectionFactory
for thisProxyConfiguration.Proxy
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-