public class HTTPConnectionFactory
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
HTTP_ENCODING_GZIP |
static java.lang.String |
HTTP_ENCODING_GZIP_STRING |
static int |
HTTP_ENCODING_PLAIN |
static int |
HTTP_ENCODING_ZLIB |
static java.lang.String |
HTTP_ENCODING_ZLIB_STRING |
Modifier and Type | Method and Description |
---|---|
HTTPClient.HTTPConnection |
createHTTPConnection(ListenerInterface target)
This method creates a new instance of HTTPConnection.
|
HTTPClient.HTTPConnection |
createHTTPConnection(ListenerInterface target,
ImmutableProxyInterface a_proxySettings)
This method creates a new instance of HTTPConnection using the specified proxy settings
(ignoring the default settings).
|
HTTPClient.HTTPConnection |
createHTTPConnection(ListenerInterface target,
ImmutableProxyInterface a_proxySettings,
int a_encoding,
boolean a_bGet,
java.util.Vector a_vecNVPairHeaderReplacements)
This method creates a new instance of HTTPConnection using the specified proxy settings
(ignoring the default settings).
|
HTTPClient.HTTPConnection |
createHTTPConnection(ListenerInterface target,
int a_encoding,
boolean a_bGet)
This method creates a new instance of HTTPConnection.
|
HTTPClient.HTTPConnection |
createHTTPConnection(ListenerInterface target,
int a_encoding,
boolean a_bGet,
java.util.Vector a_vecNVPairHeaderReplacements) |
static HTTPConnectionFactory |
getInstance()
Returns the instance of HTTPConnectionFactory (Singleton).
|
int |
getTimeout()
Returns the communication timeout (sec) for new HTTP connections.
|
void |
setNewProxySettings(ImmutableProxyInterface a_proxyInterface,
boolean a_bUseAuth)
This method sets new settings for the proxy server.
|
void |
setTimeout(int a_timeout)
Sets the communication timeout (sec) for new HTTP connections.
|
public static final int HTTP_ENCODING_PLAIN
public static final int HTTP_ENCODING_ZLIB
public static final int HTTP_ENCODING_GZIP
public static final java.lang.String HTTP_ENCODING_ZLIB_STRING
public static final java.lang.String HTTP_ENCODING_GZIP_STRING
public static HTTPConnectionFactory getInstance()
public void setNewProxySettings(ImmutableProxyInterface a_proxyInterface, boolean a_bUseAuth)
a_proxyInterface
- the listener interface of the proxy server; if it is set to null, no proxy is useda_bUseAuth
- indicates whether proxy authentication should be usedpublic void setTimeout(int a_timeout)
a_timeout
- The new communication timeout.public int getTimeout()
public HTTPClient.HTTPConnection createHTTPConnection(ListenerInterface target)
target
- The ListenerInterface of the connection target.public HTTPClient.HTTPConnection createHTTPConnection(ListenerInterface target, int a_encoding, boolean a_bGet)
target
- The ListenerInterface of the connection target.a_encoding
- http encoding used to send the data (e.g. HTTP_ENCODING_ZLIB)a_bGet
- if encoding is set to another value than HTTP_ENCODING_PLAIN, it must be specified
if this is a get or a post statementpublic HTTPClient.HTTPConnection createHTTPConnection(ListenerInterface target, int a_encoding, boolean a_bGet, java.util.Vector a_vecNVPairHeaderReplacements)
target
- a_encoding
- a_bGet
- a_vecNVPairHeaderReplacements
- you may add some HTTPClient.NVPair headerspublic HTTPClient.HTTPConnection createHTTPConnection(ListenerInterface target, ImmutableProxyInterface a_proxySettings)
target
- The ListenerInterface of the connection target.a_proxySettings
- The proxy settings to use for this single connection. If the proxy settings are
null, no proxy is used.public HTTPClient.HTTPConnection createHTTPConnection(ListenerInterface target, ImmutableProxyInterface a_proxySettings, int a_encoding, boolean a_bGet, java.util.Vector a_vecNVPairHeaderReplacements)
target
- The ListenerInterface of the connection target.a_proxySettings
- The proxy settings to use for this single connection. If the proxy settings are
null, no proxy is used.a_bGet
- if encoding is set to another value than HTTP_ENCODING_PLAIN, it must be specified
if this is a get or a post statementa_encoding
- http encoding used to send the data (e.g. HTTP_ENCODING_ZLIB)Copyright © 2023. All rights reserved.