|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.fzj.unicore.wsrflite.xfire.http.HttpUtils
public class HttpUtils
contains helper code to create HttpClient instances
and configuring SSL on a per site basis
Contains some code from XFire's CommonsHttpMessageSender
| Field Summary | |
|---|---|
static String |
DISABLE_EXPECT_CONTINUE
|
static String |
DISABLE_KEEP_ALIVE
|
static String |
GZIP_ENABLED
Enable GZIP on request and response. |
static String |
GZIP_REQUEST_ENABLED
GZIP the requests. |
static String |
GZIP_RESPONSE_ENABLED
Request GZIP encoded responses. |
static String |
HTTP_CLIENT
|
static String |
HTTP_CLIENT_PARAMS
|
static String |
HTTP_CONNECT_TIMEOUT
timeout for creating new HTTP connections |
static String |
HTTP_NON_PROXY_HOSTS
|
static String |
HTTP_PROXY_HOST
HTTP proxy host |
static String |
HTTP_PROXY_PASS
HTTP proxy password |
static String |
HTTP_PROXY_PORT
HTTP proxy port |
static String |
HTTP_PROXY_USER
HTTP proxy user name |
static String |
HTTP_STATE
|
static String |
HTTP_TIMEOUT
socket read timeout for HTTP |
static String |
MAX_CONN_PER_HOST
|
static String |
MAX_TOTAL_CONNECTIONS
|
static String |
USER_AGENT
|
| Method Summary | |
|---|---|
static void |
configureProxy(org.apache.commons.httpclient.HttpClient client,
String uri)
configure the proxy settings (taken from Kernel/System properties) on the given client |
static org.apache.commons.httpclient.HttpClient |
createClient()
create a HTTP client (code is based on XFire's CommonsHttpMessageSender |
static org.apache.commons.httpclient.HttpClient |
createClient(String uri,
ISecurityProperties security)
Convenience method for getting a pre-configured HttpClient |
static org.apache.commons.httpclient.HostConfiguration |
getHostConfiguration(ISecurityProperties sec)
get a HostConfiguration using the specified security settings |
static void |
setConnectionTimeout(org.apache.commons.httpclient.HttpClient client,
int timeout)
set the connection timeout for the HTTP client |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DISABLE_KEEP_ALIVE
public static final String DISABLE_EXPECT_CONTINUE
public static final String HTTP_CLIENT_PARAMS
public static final String USER_AGENT
public static final String HTTP_NON_PROXY_HOSTS
public static final String HTTP_PROXY_HOST
public static final String HTTP_PROXY_PORT
public static final String HTTP_PROXY_USER
public static final String HTTP_PROXY_PASS
public static final String HTTP_STATE
public static final String HTTP_CLIENT
public static final String HTTP_TIMEOUT
public static final String HTTP_CONNECT_TIMEOUT
public static final String GZIP_ENABLED
public static final String GZIP_RESPONSE_ENABLED
public static final String GZIP_REQUEST_ENABLED
public static final String MAX_CONN_PER_HOST
public static final String MAX_TOTAL_CONNECTIONS
| Method Detail |
|---|
public static org.apache.commons.httpclient.HttpClient createClient(String uri,
ISecurityProperties security)
HttpClient
uri - - URI to connect tosecurity - - security (i.e. SSL) properties
public static org.apache.commons.httpclient.HttpClient createClient()
CommonsHttpMessageSender
public static void configureProxy(org.apache.commons.httpclient.HttpClient client,
String uri)
client - - the HttpClient instanceuri - - the URI to connect topublic static org.apache.commons.httpclient.HostConfiguration getHostConfiguration(ISecurityProperties sec)
sec - - security (SSL) settings
HostConfiguration
public static void setConnectionTimeout(org.apache.commons.httpclient.HttpClient client,
int timeout)
client - - the HTTPClienttimeout - - timout in millis
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||