Skip navigation links

Oracle® Fusion Middleware Remote Intradoc Client (RIDC) Java API Reference
11g Release 1 (11.1.1)

E17274-02


oracle.stellent.ridc.protocol.http
Class IdcHttpProtocol

java.lang.Object
  extended by oracle.stellent.ridc.protocol.http.IdcHttpProtocol

All Implemented Interfaces:
Protocol

public class IdcHttpProtocol
extends java.lang.Object
implements Protocol

Field Summary
static java.lang.String IDC_HTTP_METHOD
           
static java.lang.String IDC_VERSION
           

 

Fields inherited from interface oracle.stellent.ridc.protocol.Protocol
IDC_HEADER_PREFIX

 

Constructor Summary
IdcHttpProtocol(ServiceRequest<IdcHttpClientConnection> serviceRequest, DataFactory dataFactory, IdcHttpClientConfig config)
           

 

Method Summary
protected  void addRequestData(DataBinder binder, org.apache.commons.httpclient.HttpMethod httpMethod)
          Set standard request headers, cookies and other info into the HTTP method.
protected  void addStringToBinder(java.lang.String searchString, java.lang.String htmlBody, DataBinder binder)
           
static AuthenticationHandler createAuthHandler(IdcContext.HttpAuthScheme authScheme, IdcHttpProtocol httpProtocol)
          Retrieve the authentication handler associated with the given authentication scheme
protected  int executeBinderMethod(ServiceRequest serviceRequest, java.util.List<org.apache.commons.httpclient.NameValuePair> parameters)
          Execute an HTTP method against the content server that POSTs a binder in HDA format
protected  int executeStreamMethod(ServiceRequest serviceRequest, java.util.List<org.apache.commons.httpclient.NameValuePair> parameters)
          Execute a multipart POST method against the content server that uploads the given files.
static java.util.Set<IdcContext.HttpAuthScheme> getAuthSchemes()
           
 IdcHttpClientConfig getClientConfig()
           
 IdcHttpClientConnection getConnection()
           
 DataFactory getDataFactory()
           
protected  java.util.List<org.apache.commons.httpclient.NameValuePair> getDefaultParameters(ServiceRequest serviceRequest)
          Create a list of the default NameValuePair parameters
 java.lang.String getEncoding()
           
 org.apache.commons.httpclient.HttpClient getHttpClient()
           
 java.io.InputStream getInputStream()
           
 ServiceRequest<IdcHttpClientConnection> getServiceRequest()
           
 ServiceResponse readResponse()
          Reads the next message, if a message is not completely received within the timeout specified an exception is thrown.
 int sendRequest()
          Send the request to the Content Server; used internally by the AuthHandler implementations
 void writeRequest()
          Write the request to the Content Server

 

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

 

Field Detail

IDC_VERSION

public static final java.lang.String IDC_VERSION
See Also:
Constant Field Values

IDC_HTTP_METHOD

public static final java.lang.String IDC_HTTP_METHOD
See Also:
Constant Field Values

Constructor Detail

IdcHttpProtocol

public IdcHttpProtocol(ServiceRequest<IdcHttpClientConnection> serviceRequest,
                       DataFactory dataFactory,
                       IdcHttpClientConfig config)

Method Detail

getAuthSchemes

public static java.util.Set<IdcContext.HttpAuthScheme> getAuthSchemes()
Returns:
a set of the authentication schemes in the correct load order.

createAuthHandler

public static AuthenticationHandler createAuthHandler(IdcContext.HttpAuthScheme authScheme,
                                                      IdcHttpProtocol httpProtocol)
                                               throws ProtocolException
Retrieve the authentication handler associated with the given authentication scheme
Parameters:
authScheme - the auth scheme
httpProtocol - the http protocol to initialize the auth handler
Returns:
a new authentication handler or null if not bound to the given scheme
Throws:
ProtocolException

getDataFactory

public DataFactory getDataFactory()

getServiceRequest

public ServiceRequest<IdcHttpClientConnection> getServiceRequest()

getEncoding

public java.lang.String getEncoding()

getClientConfig

public IdcHttpClientConfig getClientConfig()

getConnection

public IdcHttpClientConnection getConnection()

getHttpClient

public org.apache.commons.httpclient.HttpClient getHttpClient()

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Throws:
java.io.IOException

writeRequest

public void writeRequest()
                  throws ProtocolException
Write the request to the Content Server
Specified by:
writeRequest in interface Protocol
Throws:
ProtocolException

readResponse

public ServiceResponse readResponse()
                             throws ProtocolException
Reads the next message, if a message is not completely received within the timeout specified an exception is thrown.
Specified by:
readResponse in interface Protocol
Returns:
The received message.
Throws:
ProtocolException

sendRequest

public int sendRequest()
                throws ProtocolException
Send the request to the Content Server; used internally by the AuthHandler implementations
Returns:
the http response code
Throws:
ProtocolException

addStringToBinder

protected void addStringToBinder(java.lang.String searchString,
                                 java.lang.String htmlBody,
                                 DataBinder binder)

getDefaultParameters

protected java.util.List<org.apache.commons.httpclient.NameValuePair> getDefaultParameters(ServiceRequest serviceRequest)
Create a list of the default NameValuePair parameters
Parameters:
serviceRequest - the request
Returns:
the default parameters

executeStreamMethod

protected int executeStreamMethod(ServiceRequest serviceRequest,
                                  java.util.List<org.apache.commons.httpclient.NameValuePair> parameters)
                           throws java.io.IOException
Execute a multipart POST method against the content server that uploads the given files.
Parameters:
serviceRequest - the request
parameters - the default parameters
Returns:
the status code
Throws:
java.io.IOException

executeBinderMethod

protected int executeBinderMethod(ServiceRequest serviceRequest,
                                  java.util.List<org.apache.commons.httpclient.NameValuePair> parameters)
                           throws java.io.IOException
Execute an HTTP method against the content server that POSTs a binder in HDA format
Parameters:
serviceRequest - the service request
parameters - the default parameters
Returns:
the response code
Throws:
java.io.IOException

addRequestData

protected void addRequestData(DataBinder binder,
                              org.apache.commons.httpclient.HttpMethod httpMethod)
Set standard request headers, cookies and other info into the HTTP method. Also takes headers from the binder object if available.
Parameters:
binder - (optional) the binder
httpMethod - the http method to set the parameters

Skip navigation links

Oracle® Fusion Middleware Remote Intradoc Client (RIDC) Java API Reference
11g Release 1 (11.1.1)

E17274-02


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