Package org.apache.maven.api.settings
Class Proxy
java.lang.Object
org.apache.maven.api.settings.TrackableBase
org.apache.maven.api.settings.IdentifiableBase
org.apache.maven.api.settings.Proxy
- All Implemented Interfaces:
Serializable
@Experimental
@Generated
@ThreadSafe
@Immutable
public class Proxy
extends IdentifiableBase
implements Serializable
The
<proxy> element contains informations required to a proxy settings.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class used to create Proxy instances. -
Field Summary
Fields inherited from class org.apache.maven.api.settings.TrackableBase
GLOBAL_LEVEL, USER_LEVEL -
Method Summary
Modifier and TypeMethodDescriptiongetHost()The proxy host.The list of non-proxied hosts (delimited by |).The proxy password.intgetPort()The proxy port.The proxy protocol.The proxy user.booleanisActive()Whether this proxy configuration is the active one.static Proxy.BuilderCreates a newProxybuilder instance.static Proxy.BuildernewBuilder(boolean withDefaults) Creates a newProxybuilder instance using default values or not.static Proxy.BuildernewBuilder(Proxy from) Creates a newProxybuilder instance using the specified object as a basis.static Proxy.BuildernewBuilder(Proxy from, boolean forceCopy) Creates a newProxybuilder instance using the specified object as a basis.static ProxyCreates a newProxyinstance.static ProxynewInstance(boolean withDefaults) Creates a newProxyinstance using default values or not.with()Creates a new builder with this object as the basis.withActive(boolean active) Creates a newProxyinstance using the specified active.Creates a newProxyinstance using the specified host.Creates a newProxyinstance using the specified id.withNonProxyHosts(String nonProxyHosts) Creates a newProxyinstance using the specified nonProxyHosts.withPassword(String password) Creates a newProxyinstance using the specified password.withPort(int port) Creates a newProxyinstance using the specified port.withProtocol(String protocol) Creates a newProxyinstance using the specified protocol.withUsername(String username) Creates a newProxyinstance using the specified username.Methods inherited from class org.apache.maven.api.settings.IdentifiableBase
getId, newBuilder, newBuilderMethods inherited from class org.apache.maven.api.settings.TrackableBase
getSourceLevel, newBuilder, newBuilder, setSourceLevel
-
Method Details
-
isActive
public boolean isActive()Whether this proxy configuration is the active one.- Returns:
- a
boolean
-
getProtocol
The proxy protocol.- Returns:
- a
String
-
getUsername
The proxy user.- Returns:
- a
String
-
getPassword
The proxy password.- Returns:
- a
String
-
getPort
public int getPort()The proxy port.- Returns:
- a
int
-
getHost
The proxy host.- Returns:
- a
String
-
getNonProxyHosts
The list of non-proxied hosts (delimited by |).- Returns:
- a
String
-
with
Creates a new builder with this object as the basis.- Overrides:
within classIdentifiableBase- Returns:
- a
Builder
-
withId
Creates a newProxyinstance using the specified id.- Overrides:
withIdin classIdentifiableBase- Parameters:
id- the newStringto use- Returns:
- a
Proxywith the specified id
-
withActive
Creates a newProxyinstance using the specified active.- Parameters:
active- the newbooleanto use- Returns:
- a
Proxywith the specified active
-
withProtocol
Creates a newProxyinstance using the specified protocol.- Parameters:
protocol- the newStringto use- Returns:
- a
Proxywith the specified protocol
-
withUsername
Creates a newProxyinstance using the specified username.- Parameters:
username- the newStringto use- Returns:
- a
Proxywith the specified username
-
withPassword
Creates a newProxyinstance using the specified password.- Parameters:
password- the newStringto use- Returns:
- a
Proxywith the specified password
-
withPort
Creates a newProxyinstance using the specified port.- Parameters:
port- the newintto use- Returns:
- a
Proxywith the specified port
-
withHost
Creates a newProxyinstance using the specified host.- Parameters:
host- the newStringto use- Returns:
- a
Proxywith the specified host
-
withNonProxyHosts
Creates a newProxyinstance using the specified nonProxyHosts.- Parameters:
nonProxyHosts- the newStringto use- Returns:
- a
Proxywith the specified nonProxyHosts
-
newInstance
Creates a newProxyinstance. Equivalent tonewInstance( true ).- Returns:
- a new
Proxy - See Also:
-
newInstance
Creates a newProxyinstance using default values or not. Equivalent tonewBuilder( withDefaults ).build().- Parameters:
withDefaults- the boolean indicating whether default values should be used- Returns:
- a new
Proxy
-
newBuilder
Creates a newProxybuilder instance. Equivalent tonewBuilder( true ).- Returns:
- a new
Builder - See Also:
-
newBuilder
Creates a newProxybuilder instance using default values or not.- Parameters:
withDefaults- the boolean indicating whether default values should be used- Returns:
- a new
Builder
-
newBuilder
Creates a newProxybuilder instance using the specified object as a basis. Equivalent tonewBuilder( from, false ).- Parameters:
from- theProxyinstance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newProxybuilder instance using the specified object as a basis.- Parameters:
from- theProxyinstance to use as a basisforceCopy- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-