com.cisco.oss.foundation.http.InternalServerProxyMetadata Maven / Gradle / Ivy
/*
* Copyright 2015 Cisco Systems, Inc.
*
* 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 com.cisco.oss.foundation.http;
import org.apache.commons.lang3.tuple.Pair;
import java.util.List;
/**
* This class holds all the metadata for a given client configuration. see wiki for more info.
* Created by Yair Ogen on 1/20/14.
*/
public class InternalServerProxyMetadata {
private int readTimeout = 0;
private int connectTimeout = 0;
private long idleTimeout = 0;
private int maxConnectionsPerAddress = 1000;
private int maxConnectionsTotal = 3000;
private int maxQueueSizePerAddress = 1000;
private long waitingTime = 0;
private int numberOfAttempts = 0;
private long retryDelay = 0;
private String keyStorePath = "";
private String keyStorePassword = "";
private String trustStorePath = "";
private String trustStorePassword = "";
private boolean staleConnectionCheckEnabled = false;
private boolean autoCloseable = true;
public boolean isAutoEncodeUri() {
return autoEncodeUri;
}
private boolean autoEncodeUri = true;
private boolean followRedirects = false;
private boolean disableCookies = false;
private boolean serviceDirectoryEnabled = false;
private String serviceName = "UNKNOWN";
private List> hostAndPortPairs = null;
public boolean isAutoCloseable() {
return autoCloseable;
}
public boolean isStaleConnectionCheckEnabled() {
return staleConnectionCheckEnabled;
}
public boolean isFollowRedirects() {
return followRedirects;
}
public long getIdleTimeout() {
return idleTimeout;
}
public int getMaxConnectionsPerAddress() {
return maxConnectionsPerAddress;
}
public int getMaxConnectionsTotal() {
return maxConnectionsTotal;
}
public int getMaxQueueSizePerAddress() {
return maxQueueSizePerAddress;
}
public int getReadTimeout() {
return readTimeout;
}
public int getConnectTimeout() {
return connectTimeout;
}
public String getKeyStorePath() {
return keyStorePath;
}
public String getKeyStorePassword() {
return keyStorePassword;
}
public String getTrustStorePath() {
return trustStorePath;
}
public String getTrustStorePassword() {
return trustStorePassword;
}
public long getWaitingTime() {
return waitingTime;
}
public boolean isDisableCookies() {
return disableCookies;
}
public boolean isServiceDirectoryEnabled() {
return serviceDirectoryEnabled;
}
public String getServiceName() {
return serviceName;
}
public InternalServerProxyMetadata(int readTimeout, int connectTimeout, long idleTimeout, int maxConnectionsPerAddress, int maxConnectionsTotal, int maxQueueSizePerAddress, long waitingTime, int numberOfAttempts, long retryDelay, List> hostAndPortPairs, String keyStorePath, String keyStorePassword, String trustStorePath, String trustStorePassword, boolean followRedirects, boolean autoCloseable, boolean staleConnectionCheckEnabled, boolean disableCookies, boolean serviceDirectoryEnabled, String serviceName, boolean autoEncodeUri) {
this.readTimeout = readTimeout;
this.connectTimeout = connectTimeout;
this.idleTimeout = idleTimeout;
this.maxConnectionsPerAddress = maxConnectionsPerAddress;
this.maxConnectionsTotal = maxConnectionsTotal;
this.maxQueueSizePerAddress = maxQueueSizePerAddress;
this.waitingTime = waitingTime;
this.numberOfAttempts = numberOfAttempts;
this.retryDelay = retryDelay;
this.hostAndPortPairs = hostAndPortPairs;
this.followRedirects = followRedirects;
this.autoCloseable = autoCloseable;
this.autoEncodeUri = autoEncodeUri;
this.staleConnectionCheckEnabled = staleConnectionCheckEnabled;
this.disableCookies = disableCookies;
this.serviceDirectoryEnabled = serviceDirectoryEnabled;
this.serviceName = serviceName;
this.trustStorePassword = trustStorePassword;
this.trustStorePath = trustStorePath;
this.keyStorePassword = keyStorePassword;
this.keyStorePath = keyStorePath;
}
public int getNumberOfAttempts() {
return numberOfAttempts;
}
public long getRetryDelay() {
return retryDelay;
}
public List> getHostAndPortPairs() {
return hostAndPortPairs;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy