public final class HTTPParameters extends Object
Modifier and Type | Field and Description |
---|---|
private String |
certificateApplicationId |
private int |
certificatePort |
private String |
certificateProxy |
private long |
certificateRetry |
private long |
certificateTtl |
private boolean |
certificateUseProxy |
private int |
configuredConnectionTimeout |
private int |
configuredReadTimeout |
private int |
connectionPoolTimeout |
private int |
connectionTimeout |
private boolean |
enableProxy |
private boolean |
followRedirects |
private boolean |
frozen |
private String |
inputEncoding |
private int |
maxConnectionsPerRoute |
private int |
maxTotalConnections |
private String |
method |
private String |
outputEncoding |
private String |
path
The url request path portion
|
private boolean |
persistentConnections |
private ProviderConfig.PingOption.Enum |
pingOption |
private String |
proxyHost |
private int |
proxyPort |
private int |
readTimeout |
private int |
retries |
static String |
RETRIES |
private String |
schema |
private int |
socketBufferSizeBytes |
Constructor and Description |
---|
HTTPParameters() |
HTTPParameters(ProviderConfig providerConfig) |
HTTPParameters(String path) |
Modifier and Type | Method and Description |
---|---|
private void |
ensureNotFrozen() |
void |
freeze()
Make this unmodifiable.
|
int |
getConnectionTimeout()
Returns the connection timeout in milliseconds.
|
boolean |
getEnableProxy()
Returns whether proxying should be enabled.
|
boolean |
getFollowRedirects() |
String |
getInputEncoding()
Returns the input encoding.
|
int |
getMaxConnectionsPerRoute() |
int |
getMaxTotalConnections() |
String |
getMethod()
Returns the http method to use.
|
String |
getOutputEncoding()
Returns the output encoding.
|
String |
getPath()
Returns the url path.
|
boolean |
getPersistentConnections()
Returns whether this should use persistent connections.
|
ProviderConfig.PingOption.Enum |
getPingOption() |
String |
getProxyHost()
Returns the proxy host to use (if enabled).
|
int |
getProxyPort()
Returns the proxy port to use (if enabled).
|
String |
getProxyType()
Returns the proxy type to use (if enabled).
|
int |
getReadTimeout()
Returns the read timeout in milliseconds.
|
int |
getRetries() |
String |
getSchema()
Returns the schema to use.
|
int |
getSocketBufferSizeBytes() |
String |
getYcaApplicationId() |
int |
getYcaPort() |
String |
getYcaProxy() |
long |
getYcaRetry() |
long |
getYcaTtl() |
boolean |
getYcaUseProxy() |
void |
setConnectionTimeout(int connectionTimeout) |
void |
setEnableProxy(boolean enableProxy) |
void |
setFollowRedirects(boolean followRedirects) |
void |
setInputEncoding(String inputEncoding) |
void |
setMaxConnectionsPerRoute(int maxConnectionsPerRoute) |
void |
setMaxTotalConnections(int maxTotalConnections) |
void |
setMethod(String method) |
void |
setOutputEncoding(String outputEncoding) |
void |
setPath(String path)
Set the url path to use in queries to this.
|
void |
setPersistentConnections(boolean persistentConnections)
Note: This is currently largely a noop: Connections are reused even when this is set to true.
|
void |
setPingOption(ProviderConfig.PingOption.Enum pingOption) |
void |
setProxyHost(String proxyHost) |
void |
setProxyPort(int proxyPort) |
void |
setReadTimeout(int readTimeout) |
void |
setRetries(int retries) |
void |
setSchema(String schema) |
void |
setSocketBufferSizeBytes(int socketBufferSizeBytes) |
org.apache.http.params.HttpParams |
toHttpParams()
Returns the eligible subset of this as a HttpParams snapshot
AND configures the Apache HTTP library with the parameters of this
|
org.apache.http.params.HttpParams |
toHttpParams(int connectionTimeout,
int readTimeout)
Returns the eligible subset of this as a HttpParams snapshot
AND configures the Apache HTTP library with the parameters of this
|
public static final String RETRIES
private boolean frozen
private String path
private int connectionTimeout
private int readTimeout
private boolean persistentConnections
private boolean enableProxy
private String proxyHost
private int proxyPort
private String method
private String schema
private String inputEncoding
private String outputEncoding
private int maxTotalConnections
private int maxConnectionsPerRoute
private int socketBufferSizeBytes
private int retries
private int configuredReadTimeout
private int configuredConnectionTimeout
private int connectionPoolTimeout
private String certificateProxy
private int certificatePort
private String certificateApplicationId
private boolean certificateUseProxy
private long certificateTtl
private long certificateRetry
private ProviderConfig.PingOption.Enum pingOption
private boolean followRedirects
public HTTPParameters()
public HTTPParameters(String path)
public HTTPParameters(ProviderConfig providerConfig)
public final void setPath(String path)
public ProviderConfig.PingOption.Enum getPingOption()
public void setPingOption(ProviderConfig.PingOption.Enum pingOption)
public String getPath()
public boolean getFollowRedirects()
public void setFollowRedirects(boolean followRedirects)
public void setConnectionTimeout(int connectionTimeout)
public int getConnectionTimeout()
public void setReadTimeout(int readTimeout)
public int getReadTimeout()
public void setPersistentConnections(boolean persistentConnections)
public boolean getPersistentConnections()
public boolean getEnableProxy()
public void setEnableProxy(boolean enableProxy)
public String getProxyType()
public void setProxyHost(String proxyHost)
public String getProxyHost()
public void setProxyPort(int proxyPort)
public int getProxyPort()
public void setMethod(String method)
public String getMethod()
public void setSchema(String schema)
public String getSchema()
public void setInputEncoding(String inputEncoding)
public String getInputEncoding()
public void setOutputEncoding(String outputEncoding)
public String getOutputEncoding()
public void freeze()
private void ensureNotFrozen()
public org.apache.http.params.HttpParams toHttpParams()
public org.apache.http.params.HttpParams toHttpParams(int connectionTimeout, int readTimeout)
public int getMaxTotalConnections()
public void setMaxTotalConnections(int maxTotalConnections)
public int getMaxConnectionsPerRoute()
public void setMaxConnectionsPerRoute(int maxConnectionsPerRoute)
public int getSocketBufferSizeBytes()
public void setSocketBufferSizeBytes(int socketBufferSizeBytes)
public int getRetries()
public void setRetries(int retries)
public String getYcaProxy()
public int getYcaPort()
public String getYcaApplicationId()
public boolean getYcaUseProxy()
public long getYcaTtl()
public long getYcaRetry()
Copyright © 2018. All rights reserved.