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.intradoc
Class HdaProtocol<TConnection extends Connection>

java.lang.Object
  extended by oracle.stellent.ridc.protocol.intradoc.HdaProtocol<TConnection>

All Implemented Interfaces:
Protocol
Direct Known Subclasses:
IntradocProtocol, JaxWSProtocol

public abstract class HdaProtocol<TConnection extends Connection>
extends Object
implements Protocol

Field Summary
static String BEGIN_HDA
           
static String BEGIN_HDA_NO_HEADER
           
static String CONTENT_LENGTH
           
static String CONTENT_LENGTH_HEADER
           
static String CONTENT_TYPE_HEADER
           
static String END_HDA
           
static String END_HEADER_LINE
           
static String END_HEADERS
           
static String END_MESSAGE
           
static String END_SERVER_HEADERS
           
static String HEADER_ENCODING_HEADER
           
static String HEADER_LINE
           
static String HTTP_HOST
           
static String HTTP_HOST_HEADER
           
static String IDC_FILE
           
static String REMOTE_USER_HEADER
           
static String REQUEST_METHOD_HEADER
           
static int RETRY_COUNT
           
static String USE_STRICT_GET
           
static String USER_AGENT_HEADER
           

 

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

 

Constructor Summary
HdaProtocol(DataFactory dataFactory, ServiceRequest<TConnection> serviceRequest)
          Constructor

 

Method Summary
protected  Map<String,String> getAdditionalHeaders(DataBinder binder)
          Returns a properties object with headers contained in binder.
 TConnection getConnection()
           
 DataFactory getDataFactory()
           
 String getEncoding()
           
 IdcFilterManager getFilterManager()
           
 String getHeaderCharset()
           
protected  Map<String,String> getHeaders()
          The headers
protected  String getHeadersAsString(Map<String,String> headerMap)
          Get all the headers in a hda-compliant (EOL seperated) string
protected  String getHeaderString(boolean isMultiPart, long contentLength, Map<String,String> additionalHeaders)
           
 OutputStream getRequestStream()
           
 InputStream getResponseStream()
           
 ServiceRequest<TConnection> getServiceRequest()
           
protected  InputStream readHdaStream()
          Creates a stream to the next HDA message.
protected  boolean readHeaders()
          Read the headers (Http format) from the content server
 ServiceResponse readResponse()
          Reads the next message, if a message is not completely received within the timeout specified an exception is thrown.
 void setFilterManager(IdcFilterManager filterManager)
           
 void setHeaderCharset(String headerCharset)
           
protected  void writeMultipartRequest(Map<String,String> additionalHeaders)
          Special handling for the multipart message
 void writeRequest()
          Sends the specified message to the Content Server.
protected  void writeStandardRequest(Map<String,String> additionalHeaders)
           

 

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

 

Methods inherited from interface oracle.stellent.ridc.protocol.Protocol
logout

 

Field Detail

HEADER_ENCODING_HEADER

public static final String HEADER_ENCODING_HEADER
See Also:
Constant Field Values

CONTENT_TYPE_HEADER

public static final String CONTENT_TYPE_HEADER
See Also:
Constant Field Values

USER_AGENT_HEADER

public static final String USER_AGENT_HEADER
See Also:
Constant Field Values

HTTP_HOST_HEADER

public static final String HTTP_HOST_HEADER
See Also:
Constant Field Values

CONTENT_LENGTH_HEADER

public static final String CONTENT_LENGTH_HEADER
See Also:
Constant Field Values

REMOTE_USER_HEADER

public static final String REMOTE_USER_HEADER
See Also:
Constant Field Values

REQUEST_METHOD_HEADER

public static final String REQUEST_METHOD_HEADER
See Also:
Constant Field Values

USE_STRICT_GET

public static final String USE_STRICT_GET
See Also:
Constant Field Values

END_HEADERS

public static final String END_HEADERS
See Also:
Constant Field Values

HEADER_LINE

public static final String HEADER_LINE
See Also:
Constant Field Values

END_SERVER_HEADERS

public static final String END_SERVER_HEADERS
See Also:
Constant Field Values

END_MESSAGE

public static final String END_MESSAGE
See Also:
Constant Field Values

END_HEADER_LINE

public static final String END_HEADER_LINE
See Also:
Constant Field Values

BEGIN_HDA

public static final String BEGIN_HDA
See Also:
Constant Field Values

BEGIN_HDA_NO_HEADER

public static final String BEGIN_HDA_NO_HEADER
See Also:
Constant Field Values

END_HDA

public static final String END_HDA
See Also:
Constant Field Values

HTTP_HOST

public static final String HTTP_HOST
See Also:
Constant Field Values

RETRY_COUNT

public static final int RETRY_COUNT
See Also:
Constant Field Values

CONTENT_LENGTH

public static final String CONTENT_LENGTH
See Also:
Constant Field Values

IDC_FILE

public static final String IDC_FILE
See Also:
Constant Field Values

Constructor Detail

HdaProtocol

public HdaProtocol(DataFactory dataFactory,
                   ServiceRequest<TConnection> serviceRequest)
Constructor
Parameters:
dataFactory - the data factory
serviceRequest - the service request

Method Detail

getDataFactory

public DataFactory getDataFactory()

getServiceRequest

public ServiceRequest<TConnection> getServiceRequest()

getConnection

public TConnection getConnection()

getResponseStream

public InputStream getResponseStream()
                              throws IOException
Throws:
IOException

getRequestStream

public OutputStream getRequestStream()
                              throws IOException
Throws:
IOException

getHeaderCharset

public String getHeaderCharset()
Returns:
charset used to decode the header

setHeaderCharset

public void setHeaderCharset(String headerCharset)

getEncoding

public String getEncoding()
Returns:
the encoding to use for the message

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
Sends the specified message to the Content Server.
Specified by:
writeRequest in interface Protocol
Throws:
ProtocolException - If an error occurs during the send.

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 - If an error occurs or timeout is reached.

writeStandardRequest

protected void writeStandardRequest(Map<String,String> additionalHeaders)
                             throws IOException
Parameters:
additionalHeaders -
Throws:
IOException

writeMultipartRequest

protected void writeMultipartRequest(Map<String,String> additionalHeaders)
                              throws IOException
Special handling for the multipart message
Parameters:
additionalHeaders - additional headers to send
Throws:
IOException

getAdditionalHeaders

protected Map<String,String> getAdditionalHeaders(DataBinder binder)
Returns a properties object with headers contained in binder.
Parameters:
binder - The binder to look for additional headers.
Returns:
The created properties object.

getHeaderString

protected String getHeaderString(boolean isMultiPart,
                                 long contentLength,
                                 Map<String,String> additionalHeaders)

getHeadersAsString

protected String getHeadersAsString(Map<String,String> headerMap)
Get all the headers in a hda-compliant (EOL seperated) string
Parameters:
headerMap - a header map
Returns:
a formatted string of the header

readHeaders

protected boolean readHeaders()
                       throws IOException
Read the headers (Http format) from the content server
Returns:
true if successful, false otherwise
Throws:
IOException

readHdaStream

protected InputStream readHdaStream()
                             throws IOException
Creates a stream to the next HDA message. If no content length is set, the stream is read into memory until the HDA message is closed.
Returns:
the message to consume via a stream
Throws:
IOException - If an error occurs or timeout is reached.

getHeaders

protected Map<String,String> getHeaders()
The headers
Returns:
the headers

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.