Skip navigation links

Oracle® WebCenter Content Remote Intradoc Client (RIDC) Java API Reference
11g Release 1 (11.1)

E17274-03


oracle.stellent.ridc.protocol.http.apache4.impl
Class HttpApache4Method<M extends org.apache.http.client.methods.HttpRequestBase>

java.lang.Object
  extended by oracle.stellent.ridc.protocol.http.apache4.impl.HttpApache4Method<M>

Type Parameters:
M -
All Implemented Interfaces:
RIDCHttpMethod
Direct Known Subclasses:
HttpApache4GetMethod, HttpApache4PostMethod

public abstract class HttpApache4Method<M extends org.apache.http.client.methods.HttpRequestBase>
extends java.lang.Object
implements RIDCHttpMethod

Abstract implementation of the GET and POST method in Apache 4.x


Field Summary
protected  HttpApache4Client httpClient
           
protected  M method
           

 

Constructor Summary
HttpApache4Method()
           

 

Method Summary
 void addRequestHeader(java.lang.String name, java.lang.String value)
          Add a request header
 int execute()
          Execute the request
 java.io.InputStream getResponseBodyAsStream()
          Get the response as a stream
 RIDCHttpHeader getResponseHeader(java.lang.String headerName)
          Get response header
 java.util.List<RIDCHttpHeader> getResponseHeaders()
          Get all response headers
 RIDCHttpClient getRidcClient()
          Get the connection instance that this method is associated with
 int getStatusCode()
          Get the status code of the response
 java.lang.String getStatusLine()
          Get the status line of the response
 java.net.URI getURI()
          Get the uri of the request
 void releaseConnection()
          Release the connection
 void setCookiePolicy(java.lang.String cookiePolicy)
          Set Cookie policy for this action
 void setFollowRedirects(boolean followRedirects)
          Set the follow directs option for the connection
 void setParameter(java.lang.String param, java.lang.String value)
          Set request parameters
 void setQueryString(java.util.List<NameValuePair> nvpairList)
          Set the query string for the request
 void setRequestHeader(java.lang.String headerName, java.lang.String headerValue)
          Set the request header for the request

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

method

protected M extends org.apache.http.client.methods.HttpRequestBase method

httpClient

protected HttpApache4Client httpClient

Constructor Detail

HttpApache4Method

public HttpApache4Method()

Method Detail

addRequestHeader

public void addRequestHeader(java.lang.String name,
                             java.lang.String value)
Add a request header
Specified by:
addRequestHeader in interface RIDCHttpMethod
Parameters:
name - the header name
value - the header value

getResponseBodyAsStream

public java.io.InputStream getResponseBodyAsStream()
                                            throws java.io.IOException
Get the response as a stream
Specified by:
getResponseBodyAsStream in interface RIDCHttpMethod
Returns:
the response stream
Throws:
java.io.IOException

getResponseHeader

public RIDCHttpHeader getResponseHeader(java.lang.String headerName)
Get response header
Specified by:
getResponseHeader in interface RIDCHttpMethod
Parameters:
headerName - the header name
Returns:

getResponseHeaders

public java.util.List<RIDCHttpHeader> getResponseHeaders()
Get all response headers
Specified by:
getResponseHeaders in interface RIDCHttpMethod
Returns:
list of headers

getStatusCode

public int getStatusCode()
Get the status code of the response
Specified by:
getStatusCode in interface RIDCHttpMethod
Returns:

getStatusLine

public java.lang.String getStatusLine()
Get the status line of the response
Specified by:
getStatusLine in interface RIDCHttpMethod
Returns:

getURI

public java.net.URI getURI()
                    throws java.net.URISyntaxException,
                           org.apache.commons.httpclient.URIException
Get the uri of the request
Specified by:
getURI in interface RIDCHttpMethod
Returns:
Throws:
java.net.URISyntaxException
org.apache.commons.httpclient.URIException

releaseConnection

public void releaseConnection()
Release the connection
Specified by:
releaseConnection in interface RIDCHttpMethod

setCookiePolicy

public void setCookiePolicy(java.lang.String cookiePolicy)
Set Cookie policy for this action
Specified by:
setCookiePolicy in interface RIDCHttpMethod
Parameters:
cookiePolicy -

setFollowRedirects

public void setFollowRedirects(boolean followRedirects)
Set the follow directs option for the connection
Specified by:
setFollowRedirects in interface RIDCHttpMethod
Parameters:
followRedirects -

setRequestHeader

public void setRequestHeader(java.lang.String headerName,
                             java.lang.String headerValue)
Set the request header for the request
Specified by:
setRequestHeader in interface RIDCHttpMethod
Parameters:
headerName -
headerValue -

setParameter

public void setParameter(java.lang.String param,
                         java.lang.String value)
Set request parameters
Specified by:
setParameter in interface RIDCHttpMethod
Parameters:
param - param name
value - param value

setQueryString

public void setQueryString(java.util.List<NameValuePair> nvpairList)
Set the query string for the request
Specified by:
setQueryString in interface RIDCHttpMethod
Parameters:
paramList -

getRidcClient

public RIDCHttpClient getRidcClient()
Get the connection instance that this method is associated with
Specified by:
getRidcClient in interface RIDCHttpMethod
Returns:

execute

public int execute()
            throws java.io.IOException
Execute the request
Specified by:
execute in interface RIDCHttpMethod
Returns:
status code of the response
Throws:
java.io.IOException

Skip navigation links

Oracle® WebCenter Content Remote Intradoc Client (RIDC) Java API Reference
11g Release 1 (11.1)

E17274-03


Copyright © 2008, 2011, Oracle and/or its affiliates. All rights reserved.