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,- InputLocationTracker
@Experimental
@Generated
@ThreadSafe
@Immutable
public class Proxy
extends IdentifiableBase
implements Serializable, InputLocationTracker
The 
<proxy> element contains information required to a proxy settings.- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classBuilder class used to create Proxy instances.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedProxy(Proxy.Builder builder) Constructor for this class, to be called from its subclasses andProxy.Builder.
- 
Method SummaryModifier and TypeMethodDescriptionWhether this proxy configuration is the active one.getHost()The proxy host.getLocation(Object key) Gets the location of the specified field in the input source.Gets the keys of the locations of the input source.The list of non-proxied hosts (delimited by|).The proxy password.intgetPort()Returns the port to use for this proxy.The proxy port.The proxy protocol.The proxy user.booleanisActive()Indicates if this proxy is active.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.withActiveString(String activeString) Creates a newProxyinstance using the specified activeString.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.withPortString(String portString) Creates a newProxyinstance using the specified portString.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.IdentifiableBasegetId, newBuilder, newBuilderMethods inherited from class org.apache.maven.api.settings.TrackableBasegetImportedFrom, newBuilder, newBuilder
- 
Constructor Details- 
ProxyConstructor for this class, to be called from its subclasses andProxy.Builder.- See Also:
 
 
- 
- 
Method Details- 
getActiveStringWhether this proxy configuration is the active one. Note: While the type of this field isStringfor technical reasons, the semantic type is actuallyboolean.- Returns:
- a String
- See Also:
 
- 
getProtocolThe proxy protocol.- Returns:
- a String
 
- 
getUsernameThe proxy user.- Returns:
- a String
 
- 
getPasswordThe proxy password.- Returns:
- a String
 
- 
getPortStringThe proxy port. Note: While the type of this field isStringfor technical reasons, the semantic type is actuallyint.- Returns:
- a String
- See Also:
 
- 
getHostThe proxy host.- Returns:
- a String
 
- 
getNonProxyHostsThe list of non-proxied hosts (delimited by|).- Returns:
- a String
 
- 
getLocationGets the location of the specified field in the input source.- Specified by:
- getLocationin interface- InputLocationTracker
- Overrides:
- getLocationin class- IdentifiableBase
 
- 
getLocationKeysGets the keys of the locations of the input source.- Overrides:
- getLocationKeysin class- IdentifiableBase
 
- 
withCreates a new builder with this object as the basis.- Overrides:
- within class- IdentifiableBase
- Returns:
- a Builder
 
- 
withIdCreates a newProxyinstance using the specified id.- Overrides:
- withIdin class- IdentifiableBase
- Parameters:
- id- the new- Stringto use
- Returns:
- a Proxywith the specified id
 
- 
withActiveStringCreates a newProxyinstance using the specified activeString.- Parameters:
- activeString- the new- Stringto use
- Returns:
- a Proxywith the specified activeString
 
- 
withProtocolCreates a newProxyinstance using the specified protocol.- Parameters:
- protocol- the new- Stringto use
- Returns:
- a Proxywith the specified protocol
 
- 
withUsernameCreates a newProxyinstance using the specified username.- Parameters:
- username- the new- Stringto use
- Returns:
- a Proxywith the specified username
 
- 
withPasswordCreates a newProxyinstance using the specified password.- Parameters:
- password- the new- Stringto use
- Returns:
- a Proxywith the specified password
 
- 
withPortStringCreates a newProxyinstance using the specified portString.- Parameters:
- portString- the new- Stringto use
- Returns:
- a Proxywith the specified portString
 
- 
withHostCreates a newProxyinstance using the specified host.- Parameters:
- host- the new- Stringto use
- Returns:
- a Proxywith the specified host
 
- 
withNonProxyHostsCreates a newProxyinstance using the specified nonProxyHosts.- Parameters:
- nonProxyHosts- the new- Stringto use
- Returns:
- a Proxywith the specified nonProxyHosts
 
- 
newInstanceCreates a newProxyinstance. Equivalent tonewInstance(true).- Returns:
- a new Proxy
- See Also:
 
- 
newInstanceCreates 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
 
- 
newBuilderCreates a newProxybuilder instance. Equivalent tonewBuilder(true).- Returns:
- a new Builder
- See Also:
 
- 
newBuilderCreates a newProxybuilder instance using default values or not.- Parameters:
- withDefaults- the boolean indicating whether default values should be used
- Returns:
- a new Builder
 
- 
newBuilderCreates a newProxybuilder instance using the specified object as a basis. Equivalent tonewBuilder(from, false).- Parameters:
- from- the- Proxyinstance to use as a basis
- Returns:
- a new Builder
 
- 
newBuilderCreates a newProxybuilder instance using the specified object as a basis.- Parameters:
- from- the- Proxyinstance to use as a basis
- forceCopy- the boolean indicating if a copy should be forced
- Returns:
- a new Builder
 
- 
isActivepublic boolean isActive()Indicates if this proxy is active. To allow interpolation of this field, this method lazily parses thegetActiveString()value as a boolean and defaults totrueif not set.- Returns:
- a boolean indicating if this proxy is active
 
- 
getPortpublic int getPort()Returns the port to use for this proxy. To allow interpolation of this field, this method lazily parses thegetPortString()value as an integer and defaults to8080if not set.- Returns:
- an integer indicating the port to use for this proxy
 
 
-