Package org.eclipse.aether.repository
Class Proxy
- java.lang.Object
-
- org.eclipse.aether.repository.Proxy
-
public final class Proxy extends java.lang.ObjectA proxy to use for connections to a repository.
-
-
Field Summary
Fields Modifier and Type Field Description private Authenticationauthprivate java.lang.Stringhostprivate intportprivate java.lang.Stringtypestatic java.lang.StringTYPE_HTTPType denoting a proxy for HTTP transfers.static java.lang.StringTYPE_HTTPSType denoting a proxy for HTTPS transfers.
-
Constructor Summary
Constructors Constructor Description Proxy(java.lang.String type, java.lang.String host, int port)Creates a new proxy with the specified properties and no authentication.Proxy(java.lang.String type, java.lang.String host, int port, Authentication auth)Creates a new proxy with the specified properties.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)AuthenticationgetAuthentication()Gets the authentication to use for the proxy connection.java.lang.StringgetHost()Gets the host for this proxy.intgetPort()Gets the port number for this proxy.java.lang.StringgetType()Gets the type of this proxy.private static inthash(java.lang.Object obj)inthashCode()java.lang.StringtoString()
-
-
-
Field Detail
-
TYPE_HTTP
public static final java.lang.String TYPE_HTTP
Type denoting a proxy for HTTP transfers.- See Also:
- Constant Field Values
-
TYPE_HTTPS
public static final java.lang.String TYPE_HTTPS
Type denoting a proxy for HTTPS transfers.- See Also:
- Constant Field Values
-
type
private final java.lang.String type
-
host
private final java.lang.String host
-
port
private final int port
-
auth
private final Authentication auth
-
-
Constructor Detail
-
Proxy
public Proxy(java.lang.String type, java.lang.String host, int port)Creates a new proxy with the specified properties and no authentication.- Parameters:
type- The type of the proxy, e.g. "http", may benull.host- The host of the proxy, may benull.port- The port of the proxy.
-
Proxy
public Proxy(java.lang.String type, java.lang.String host, int port, Authentication auth)Creates a new proxy with the specified properties.- Parameters:
type- The type of the proxy, e.g. "http", may benull.host- The host of the proxy, may benull.port- The port of the proxy.auth- The authentication to use for the proxy connection, may benull.
-
-
Method Detail
-
getType
public java.lang.String getType()
Gets the type of this proxy.- Returns:
- The type of this proxy, never
null.
-
getHost
public java.lang.String getHost()
Gets the host for this proxy.- Returns:
- The host for this proxy, never
null.
-
getPort
public int getPort()
Gets the port number for this proxy.- Returns:
- The port number for this proxy.
-
getAuthentication
public Authentication getAuthentication()
Gets the authentication to use for the proxy connection.- Returns:
- The authentication to use or
nullif none.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
hash
private static int hash(java.lang.Object obj)
-
-