|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object anon.infoservice.HTTPConnectionFactory
public class HTTPConnectionFactory
This class creates all instances of HTTPConnection for the JAP client and is a singleton.
Field Summary | |
---|---|
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
|
private boolean |
m_bUseAuth
Indicates whether to use proxy authentication |
private java.lang.Class |
m_classHTTPCLient_ContentEncodingeModule
|
private ImmutableProxyInterface |
m_proxyInterface
The listener for the proxy used. |
private int |
m_timeout
Stores the communication timeout (sec) for new HTTP connections. |
private java.util.Vector |
m_vecHTTPConnections
The HTTPConnections that were recently created by this factory object. |
private static java.lang.Class |
ms_HTTPConnectionClass
Defines the HTTPConnection class for that this factory constructs instances. |
private static HTTPConnectionFactory |
ms_httpConnectionFactoryInstance
Stores the instance of HTTPConnectionFactory (Singleton). |
Constructor Summary | |
---|---|
private |
HTTPConnectionFactory()
This creates a new instance of HTTPConnectionFactory. |
Method Summary | |
---|---|
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)
|
private HTTPClient.HTTPConnection |
createHTTPConnectionInternal(ListenerInterface target)
Creates an HTTPConnection with the listener settings. |
private java.util.Vector |
getCreatedHTTPConnections()
Returns the recently created HTTPConnections. |
static HTTPConnectionFactory |
getInstance()
Returns the instance of HTTPConnectionFactory (Singleton). |
int |
getTimeout()
Returns the communication timeout (sec) for new HTTP connections. |
private static void |
replaceHeader(HTTPClient.HTTPConnection connection,
HTTPClient.NVPair header)
An internal helper function to set the header information for the HTTP connection. |
private static void |
setHTTPConnectionClass(java.lang.Class a_HTTPConnectionClass)
This method is used to change the type of the created HTTPConnections. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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
private static java.lang.Class ms_HTTPConnectionClass
private static HTTPConnectionFactory ms_httpConnectionFactoryInstance
private java.util.Vector m_vecHTTPConnections
private int m_timeout
private ImmutableProxyInterface m_proxyInterface
private boolean m_bUseAuth
private java.lang.Class m_classHTTPCLient_ContentEncodingeModule
Constructor Detail |
---|
private HTTPConnectionFactory()
Method Detail |
---|
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 statement
public 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 headers
public 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)
private static void replaceHeader(HTTPClient.HTTPConnection connection, HTTPClient.NVPair header)
connection
- The connection where the new headers are set.header
- The header information to set.private static void setHTTPConnectionClass(java.lang.Class a_HTTPConnectionClass)
a_HTTPConnectionClass
- the class of generated HTTPConnectionsprivate java.util.Vector getCreatedHTTPConnections()
private HTTPClient.HTTPConnection createHTTPConnectionInternal(ListenerInterface target)
target
- the basic listener settings for this connection
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |