org.sblim.cimclient.internal.http

Class HttpUrlConnection

public class HttpUrlConnection extends HttpURLConnection

Class HttpUrlConnection encapsulates a http connection
Field Summary
protected URIiUrl
Constructor Summary
HttpUrlConnection(URI pUri, HttpClientPool pHttpClientPool, AuthorizationHandler pAuthHandler)
Ctor.
Method Summary
voidclose()
Closes the client pool
voidconnect()
voiddisconnect()
StringgetHeaderField(String name)
StringgetHeaderField(int index)
StringgetHeaderFieldKey(int index)
HttpClientgetHttpClient()
Returns the http client
InputStreamgetInputStream()
OutputStreamgetOutputStream()
PermissiongetPermission()
StringgetRequestMethod()
StringgetRequestProperty(String key)
intgetResponseCode()
StringgetResponseMessage()
voidreset()
Resets the http client
voidsetRequestMethod(String pMethod)
voidsetRequestProperty(String key, String value)
StringtoString()
voiduseHttp11(boolean pUse11)
Enables/Disables the use of http 1.1
booleanusingProxy()

Field Detail

iUrl

protected URI iUrl

Constructor Detail

HttpUrlConnection

public HttpUrlConnection(URI pUri, HttpClientPool pHttpClientPool, AuthorizationHandler pAuthHandler)
Ctor.

Parameters: pUri The host URI pHttpClientPool The client pool pAuthHandler The authentication handler

Method Detail

close

public void close()
Closes the client pool

connect

public void connect()

disconnect

public void disconnect()

getHeaderField

public String getHeaderField(String name)

getHeaderField

public String getHeaderField(int index)

getHeaderFieldKey

public String getHeaderFieldKey(int index)

getHttpClient

public HttpClient getHttpClient()
Returns the http client

Returns: The http client

getInputStream

public InputStream getInputStream()

getOutputStream

public OutputStream getOutputStream()

getPermission

public Permission getPermission()

getRequestMethod

public String getRequestMethod()

getRequestProperty

public String getRequestProperty(String key)

getResponseCode

public int getResponseCode()

getResponseMessage

public String getResponseMessage()

reset

public void reset()
Resets the http client

setRequestMethod

public void setRequestMethod(String pMethod)

setRequestProperty

public void setRequestProperty(String key, String value)

toString

public String toString()

useHttp11

public void useHttp11(boolean pUse11)
Enables/Disables the use of http 1.1

Parameters: pUse11 If true http 1.1 is enabled.

usingProxy

public boolean usingProxy()
Copyright © 2005, 2009 IBM Corporation. All Rights Reserved.