Skip navigation links

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

E17274-04


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 Object
implements Protocol

Field Summary
static String IDC_HTTP_METHOD
           
static 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, RIDCHttpMethod httpMethod)
          Set standard request headers, cookies and other info into the HTTP method.
protected  void addStringToBinder(String searchString, 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, List<NameValuePair> parameters)
          Execute an HTTP method against the content server that POSTs a binder in HDA format
protected  int executeStreamMethod(ServiceRequest<?> serviceRequest, List<NameValuePair> parameters)
          Execute a multipart POST method against the content server that uploads the given files.
static Set<IdcContext.HttpAuthScheme> getAuthSchemes()
           
 IdcHttpClientConfig getClientConfig()
           
 IdcHttpClientConnection getConnection()
           
 DataFactory getDataFactory()
           
protected  List<NameValuePair> getDefaultParameters(ServiceRequest<?> serviceRequest)
          Create a list of the default NameValuePair parameters
 String getEncoding()
           
 IdcFilterManager getFilterManager()
           
 RIDCHttpClient getHttpClient()
           
 InputStream getInputStream()
           
 ServiceRequest<IdcHttpClientConnection> getServiceRequest()
           
 void logout()
          Best-effort Logout from Content Server
 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 setFilterManager(IdcFilterManager filterManager)
           
 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 String IDC_VERSION
See Also:
Constant Field Values

IDC_HTTP_METHOD

public static final 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 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 String getEncoding()

getClientConfig

public IdcHttpClientConfig getClientConfig()

getConnection

public IdcHttpClientConnection getConnection()

getHttpClient

public RIDCHttpClient getHttpClient()

getInputStream

public InputStream getInputStream()
                           throws IOException,
                                  ProtocolException
Throws:
IOException
ProtocolException

setFilterManager

public void setFilterManager(IdcFilterManager filterManager)
Specified by:
setFilterManager in interface Protocol

getFilterManager

public IdcFilterManager getFilterManager()
Specified by:
getFilterManager in interface Protocol

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

logout

public void logout()
            throws ProtocolException
Description copied from interface: Protocol
Best-effort Logout from Content Server
Specified by:
logout in interface Protocol
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(String searchString,
                                 String htmlBody,
                                 DataBinder binder)

getDefaultParameters

protected List<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,
                                  List<NameValuePair> parameters)
                           throws IOException,
                                  ProtocolException
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:
IOException
ProtocolException

executeBinderMethod

protected int executeBinderMethod(ServiceRequest<?> serviceRequest,
                                  List<NameValuePair> parameters)
                           throws IOException,
                                  ProtocolException
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:
IOException
ProtocolException

addRequestData

protected void addRequestData(DataBinder binder,
                              RIDCHttpMethod 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 Java API Reference for Oracle WebCenter Content Remote Intradoc Client (RIDC)
11g Release 1 (11.1)

E17274-04


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