opendap.dap
Class HttpWrap
java.lang.Object
opendap.dap.HttpWrap
public class HttpWrap
- extends java.lang.Object
Created by IntelliJ IDEA.
User: dmh
Date: May 13, 2010
Time: 1:25:05 PM
container around org.apache.http .HttpClient, .HttpRequestBase, and .HttpResponse
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HttpWrap
public HttpWrap()
throws HttpWrapException
- Throws:
HttpWrapException
finalize
protected void finalize()
- Overrides:
finalize
in class java.lang.Object
execute
public int execute()
throws HttpWrapException
- Throws:
HttpWrapException
getMethod
public java.lang.String getMethod()
setMethod
public void setMethod(org.apache.http.client.methods.HttpRequestBase method)
consumeContent
public void consumeContent()
setThreadCount
public void setThreadCount(int nthreads)
setGlobalCredentialsProvider
public static void setGlobalCredentialsProvider(org.apache.http.client.CredentialsProvider provider)
getGlobalCredentialsProvider
public static org.apache.http.client.CredentialsProvider getGlobalCredentialsProvider()
setCredentialsProvider
public void setCredentialsProvider(org.apache.http.client.CredentialsProvider provider)
setUserAgent
public void setUserAgent(java.lang.String agent)
setContext
public void setContext(org.apache.http.protocol.HttpContext cxt)
getStatusCode
public int getStatusCode()
getStatusLine
public java.lang.String getStatusLine()
getPath
public java.lang.String getPath()
getDoAuthentication
public boolean getDoAuthentication()
canHoldContent
public boolean canHoldContent()
getContentStream
public java.io.InputStream getContentStream()
getContentBytes
public byte[] getContentBytes(int maxsize)
getContentBytes
public byte[] getContentBytes()
getContentString
public java.lang.String getContentString()
getContentString
public java.lang.String getContentString(java.lang.String charset)
setHeader
public void setHeader(java.lang.String name,
java.lang.String value)
throws HttpWrapException
- Throws:
HttpWrapException
setMethodHeader
public void setMethodHeader(java.lang.String name,
java.lang.String value)
throws HttpWrapException
- Throws:
HttpWrapException
getHeader
public org.apache.http.Header getHeader(java.lang.String name)
getResponseHeader
public org.apache.http.Header getResponseHeader(java.lang.String name)
getHeaders
public org.apache.http.Header[] getHeaders()
getResponseHeaders
public org.apache.http.Header[] getResponseHeaders()
setMethodHead
public void setMethodHead(java.lang.String uri)
throws HttpWrapException
- Throws:
HttpWrapException
setMethodGet
public void setMethodGet(java.lang.String uri)
throws HttpWrapException
- Throws:
HttpWrapException
setMethodGet
public void setMethodGet(java.lang.String uri,
org.apache.http.protocol.HttpContext cxt)
throws HttpWrapException
- Throws:
HttpWrapException
setMethodPut
public void setMethodPut(java.lang.String uri)
throws HttpWrapException
- Throws:
HttpWrapException
setMethodPost
public void setMethodPost(java.lang.String uri)
throws HttpWrapException
- Throws:
HttpWrapException
setMethodOptions
public void setMethodOptions(java.lang.String uri)
throws HttpWrapException
- Throws:
HttpWrapException
setParameter
public void setParameter(java.lang.String name,
java.lang.Object value)
getParameter
public java.lang.Object getParameter(java.lang.String name)
close
public void close()
setContentString
public void setContentString(java.lang.String content)
throws HttpWrapException
- Throws:
HttpWrapException
getCharSet
public java.lang.String getCharSet()
getName
public java.lang.String getName()
getURI
public java.lang.String getURI()
getFollowRedirects
public java.lang.String getFollowRedirects()
getEffectiveVersion
public java.lang.String getEffectiveVersion()
getCookiePolicy
public java.lang.String getCookiePolicy()
getProtocolVersion
public java.lang.String getProtocolVersion()
getSoTimeout
public java.lang.String getSoTimeout()
getVirtualHost
public java.lang.String getVirtualHost()
headerIterator
public org.apache.http.HeaderIterator headerIterator()
getStatusText
public java.lang.String getStatusText()
getAllowedMethods
public java.util.Set<java.lang.String> getAllowedMethods()
getCookieStore
public org.apache.http.client.CookieStore getCookieStore()
setURI
public void setURI(java.lang.String uri)
setContent
public void setContent(org.apache.http.HttpEntity ct)
setHttpClient
public void setHttpClient(org.apache.http.impl.client.AbstractHttpClient w)