![JAR search and dependency download from the Maven repository](/logo.png)
org.infrastructurebuilder.util.ProxyProxy Maven / Gradle / Ivy
/**
* Copyright © 2019 admin ([email protected])
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.infrastructurebuilder.util;
import java.util.List;
import java.util.Optional;
public class ProxyProxy {
private final String id;
private final String host;
private final List nonProxyHosts;
private final Optional password;
private final int port;
private final String protocol;
private final Optional username;
private final boolean active;
/**
* @param id
* @param host
* @param nonProxyHosts
* @param password
* @param port
* @param protocol
* @param username
* @param active
*/
public ProxyProxy(String id, String host, List nonProxyHosts, Optional password, int port,
String protocol, Optional username, boolean active) {
this.id = id;
this.host = host;
this.nonProxyHosts = nonProxyHosts;
this.password = password;
this.port = port;
this.protocol = protocol; // "protocol" is the same as "type" for WagonManager
this.username = username;
this.active = active;
}
public String getId() {
return this.id;
}
/**
* Get the proxy host.
*
* @return String
*/
public String getHost() {
return this.host;
}
/**
* Get the list of non-proxied hosts (was delimited by |).
*
* @return String
*/
public List getNonProxyHosts() {
return this.nonProxyHosts;
}
/**
* Get the proxy password.
*
* @return String
*/
public Optional getPassword() {
return this.password;
}
/**
* Get the proxy port.
*
* @return int
*/
public int getPort() {
return this.port;
}; //-- int getPort()
/**
* Get the proxy protocol.
*
* @return String
*/
public String getProtocol() {
return this.protocol;
}
/**
* Get the proxy user.
*
* @return String
*/
public Optional getUsername() {
return this.username;
}
/**
* Get whether this proxy configuration is the active one.
*
* @return boolean
*/
public boolean isActive() {
return this.active;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy