Skip navigation links

Oracle® WebLogic Server Web Clipping Transport API Reference
11g Release 1 (11.1.1)

E14346-01


oracle.portal.wcs.transport.http
Class DefaultWcrHttpInputContext

java.lang.Object
  extended by oracle.portal.wcs.transport.AbstractInputContext
      extended by oracle.portal.wcs.transport.http.DefaultHttpInputContext
          extended by oracle.portal.wcs.transport.http.DefaultWcrHttpInputContext

All Implemented Interfaces:
java.io.Serializable, HttpHeaderConstants, ContentTypeConstants, HttpInputContext, WcrHttpInputContext, InputContext

public class DefaultWcrHttpInputContext
extends DefaultHttpInputContext
implements WcrHttpInputContext

This class subclass from DefaultHttpInputContext and at same time, contains an object of DefaultHttpInputContext as a place holder for all the HTTP request information.

See Also:
Serialized Form

Field Summary

 

Fields inherited from class oracle.portal.wcs.transport.http.DefaultHttpInputContext
m_bActive, m_bNew, m_htHeaders, m_htParams, m_props, m_szAuthRealm, m_szAuthType, m_szEffectiveUri, m_szMethod, m_szPassword, m_szUrl, m_szUsername, m_transport, m_tsc

 

Fields inherited from class oracle.portal.wcs.transport.AbstractInputContext
m_r, m_szContentType, m_szReqEncoding, m_szRespEncoding

 

Fields inherited from interface oracle.portal.wcs.transport.InputContext
BUFFER_SIZE

 

Fields inherited from interface oracle.portal.wcs.common.HttpHeaderConstants
COOKIE_NAME_VAL_JSESSIONID, DEFAULT_HTTP_PORT, DEFAULT_PROXY_PORT, HEADER_ACCEPT, HEADER_ACCEPT_CHARSET, HEADER_ACCEPT_DELIMITER, HEADER_ACCEPT_ENCODING, HEADER_ACCEPT_LANGUAGE, HEADER_ACCEPT_VAL_ANY, HEADER_ACCEPT_VAL_APP_JS, HEADER_ACCEPT_VAL_IMAGE_GIF, HEADER_ACCEPT_VAL_IMAGE_JPEG, HEADER_ACCEPT_VAL_IMAGE_PJPEG, HEADER_ACCEPT_VAL_IMAGE_X_XBITMAP, HEADER_ACCEPT_VAL_TEXT_HTML, HEADER_AUTHORIZATION, HEADER_CHARSET_VAL_SJIS, HEADER_CHARSET_VAL_UTF8, HEADER_CONNECTION, HEADER_CONTENT_TYPE, HEADER_COOKIE, HEADER_EXPIRES, HEADER_HOST, HEADER_IF_MODIFIED_SINCE, HEADER_IF_NONE_MATCH, HEADER_KEEP_ALIVE, HEADER_LAST_MODIFIED, HEADER_PROXY_AUTHORIZATION, HEADER_REFERER, HEADER_USER_AGENT, HEADER_USER_AGENT_NOVERSION, HEADER_WWW_AUTHENTICATE, HEADER_X_ORACLE_PREFIX, HTTP_AUTH_DIGEST_NAME_NONCE, HTTP_AUTH_DIGEST_NAME_OPAQUE, HTTP_AUTH_DIGEST_NAME_QOP, HTTP_AUTH_DIGEST_NAME_RESPONSE, HTTP_AUTH_DIGEST_NAME_USERNAME, HTTP_AUTH_NAME_REALM, HTTP_AUTH_SCHEME_VALUE_BASIC, HTTP_AUTH_SCHEME_VALUE_DIGEST, HTTP_METHOD_GET, HTTP_METHOD_POST, HTTP_STATUS_200_OK, HTTP_STATUS_400_BAD_REQUEST, HTTP_STATUS_401_UNAUTHORIZED, HTTP_STATUS_402_PAYMENT_REQUIRED, HTTP_STATUS_403_FORBIDDEN, HTTP_STATUS_404_NOT_FOUND, HTTP_STATUS_405_METHOD_NOT_ALLOWED, HTTP_STATUS_406_NOT_ACCEPTABLE, HTTP_STATUS_407_PROXY_AUTH_REQUIRED, HTTP_STATUS_408_REQUEST_TIMEOUT, METATAG_CHARSET_VAL_EUCJP, METATAG_CHARSET_VAL_SJIS, METATAG_CHARSET_VAL_WIN31J

 

Fields inherited from interface oracle.portal.wcs.ContentTypeConstants
CHARSET_UTF8, CONTENT_TYPE_APP_JS, CONTENT_TYPE_APP_OS, CONTENT_TYPE_APP_PDF, CONTENT_TYPE_IMAGES, CONTENT_TYPE_TEXT_CSS, CONTENT_TYPE_TEXT_HTML, CONTENT_TYPE_TEXT_JS, CONTENT_TYPE_TEXT_PLAIN, CONTENT_TYPE_TEXT_XML, CONTENT_TYPE_UNDEFINED, ISO_LATIN_1, SZ_CONTENT_TYPE_APP_DL, SZ_CONTENT_TYPE_APP_JS, SZ_CONTENT_TYPE_APP_OS, SZ_CONTENT_TYPE_APP_PDF, SZ_CONTENT_TYPE_APP_WFU, SZ_CONTENT_TYPE_DUMMY, SZ_CONTENT_TYPE_IMAGE_PREFIX, SZ_CONTENT_TYPE_MULTIPART_FORM_DATA, SZ_CONTENT_TYPE_TEXT_CSS, SZ_CONTENT_TYPE_TEXT_HTML, SZ_CONTENT_TYPE_TEXT_HTML_UTF8, SZ_CONTENT_TYPE_TEXT_JS, SZ_CONTENT_TYPE_TEXT_PLAIN, SZ_CONTENT_TYPE_TEXT_XML, SZ_CONTENT_TYPE_UNDEFINED, SZ_CONTENT_TYPE_WCRESULTSET, SZ_DEFAULT_CONTENT_TYPE_WITH_CHARSET, UTF_8

 

Constructor Summary
DefaultWcrHttpInputContext(HttpInputContext hic)
           

 

Method Summary
 void close()
          Relay the call down to the transport
protected  HttpTransportLiaison createHttpTransportLiaison()
          The factory method to create Transport layer
 java.lang.String getAuthPassword()
           
 java.lang.String getAuthRealm()
          The realm of the http authorization
 java.lang.String getAuthType()
          Authorization
 java.lang.String getAuthUsername()
          This method must be called before any other calls except getAuthType()
 java.lang.String getContentType()
          If the content-type is set by the caller, simply return it.
 java.lang.String getEffectiveUri()
          Returns the effective uri.
 java.util.Hashtable getHeaders()
          Headers
 java.io.InputStream getInputStream()
          This method needs to be implemented by all subclasses in case they depend on getReader from this class.
 java.lang.String getMethod()
          Http method
 WcrHttpInputContext getNext()
           
 java.lang.String[] getParam(java.lang.String szName)
          Return the parameter value give a name
 java.util.Enumeration getParamNames()
          Returns the enumeration of parameter names
 WcrHttpInputContext getPrevious()
           
 java.lang.String getProxyAuthRealm()
           
 java.lang.String getProxyAuthType()
           
 java.lang.String getProxyHost()
          Proxy
 java.lang.String getProxyPassword()
           
 int getProxyPort()
           
 java.lang.String getProxyUsername()
           
 java.lang.String getQueryString()
          Convert the hashtbale into querystring.
 java.io.Reader getReader()
          If character set is defined, let super handle it, otherwise, create our own one
 javax.servlet.http.Cookie[] getResponseCookies()
           
 java.lang.String getResponseEncoding()
          This method could return null for html, since the content-type return could be simple "text/html" However, for javascript, it should not return null, rather, it will return the default one.
 java.util.Hashtable getResponseHeaders()
           
 int getResponseStatus()
           
 TransportSessionContext getSessionContext()
           
 int getTimeConsumed()
          Get the number of milliseconds consumed for this request
 int getTimeout()
          Timeout
 HttpTransportLiaison getTransportLiaison()
          The main reason we do not have method setTransportLiaison is to support cluster.
 java.lang.String getUrl()
          Http Url which could contains querystring
 java.lang.String getWalletLocation()
          SSL
 java.lang.String getWalletPassword()
           
 boolean hasNext()
           
 boolean hasPrevious()
           
 boolean isNew()
          In provider, every request is new thus consumed time is always calculated
 boolean isStateChanged()
          This method tells that if this HttpInputContext needs to be added into the ClippingDef.
 void open()
          Opens up the stream so that subsequent calls to getReader will be ok.
 void setNext(WcrHttpInputContext ic)
           
 void setNonStateChanged()
          Mark this HttpInputContext to be nonactive.
 void setOld()
          never old
 void setPrevoius(WcrHttpInputContext ic)
           
 void setResponseEncoding(java.lang.String szEncoding)
          After this call, the engine will not go to external resource to retrieve response charset encoding.

 

Methods inherited from class oracle.portal.wcs.transport.http.DefaultHttpInputContext
addParam, addParam, createHttpTransportLiaison, getParams, getUser, setAuthPassword, setAuthRealm, setAuthType, setAuthUsername, setHeaders, setSessionContext, setUrl, setUser, toString

 

Methods inherited from class oracle.portal.wcs.transport.AbstractInputContext
getRequestEncoding, setContentType, setRequestEncoding

 

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

 

Methods inherited from interface oracle.portal.wcs.transport.http.HttpInputContext
addParam, addParam, getParams, getUser, setAuthPassword, setAuthRealm, setAuthType, setAuthUsername, setHeaders, setSessionContext, setUrl, setUser, toString

 

Methods inherited from interface oracle.portal.wcs.transport.InputContext
getRequestEncoding, setContentType, setRequestEncoding

 

Constructor Detail

DefaultWcrHttpInputContext

public DefaultWcrHttpInputContext(HttpInputContext hic)

Method Detail

createHttpTransportLiaison

protected HttpTransportLiaison createHttpTransportLiaison()
The factory method to create Transport layer
Overrides:
createHttpTransportLiaison in class DefaultHttpInputContext

getNext

public WcrHttpInputContext getNext()
Specified by:
getNext in interface WcrHttpInputContext

hasNext

public boolean hasNext()
Specified by:
hasNext in interface WcrHttpInputContext

getPrevious

public WcrHttpInputContext getPrevious()
Specified by:
getPrevious in interface WcrHttpInputContext

hasPrevious

public boolean hasPrevious()
Specified by:
hasPrevious in interface WcrHttpInputContext

setNext

public void setNext(WcrHttpInputContext ic)
Specified by:
setNext in interface WcrHttpInputContext

setPrevoius

public void setPrevoius(WcrHttpInputContext ic)
Specified by:
setPrevoius in interface WcrHttpInputContext

getUrl

public java.lang.String getUrl()
Description copied from class: DefaultHttpInputContext
Http Url which could contains querystring
Specified by:
getUrl in interface InputContext
Overrides:
getUrl in class DefaultHttpInputContext

getMethod

public java.lang.String getMethod()
Description copied from class: DefaultHttpInputContext
Http method
Specified by:
getMethod in interface HttpInputContext
Overrides:
getMethod in class DefaultHttpInputContext

getAuthType

public java.lang.String getAuthType()
                             throws HttpTransportException
Authorization
Specified by:
getAuthType in interface HttpInputContext
Overrides:
getAuthType in class DefaultHttpInputContext
Throws:
HttpTransportException

getAuthRealm

public java.lang.String getAuthRealm()
Description copied from class: DefaultHttpInputContext
The realm of the http authorization
Specified by:
getAuthRealm in interface HttpInputContext
Overrides:
getAuthRealm in class DefaultHttpInputContext

getAuthUsername

public java.lang.String getAuthUsername()
Description copied from class: DefaultHttpInputContext
This method must be called before any other calls except getAuthType()
Specified by:
getAuthUsername in interface HttpInputContext
Overrides:
getAuthUsername in class DefaultHttpInputContext

getAuthPassword

public java.lang.String getAuthPassword()
Specified by:
getAuthPassword in interface HttpInputContext
Overrides:
getAuthPassword in class DefaultHttpInputContext

getProxyHost

public java.lang.String getProxyHost()
Proxy
Specified by:
getProxyHost in interface HttpInputContext
Overrides:
getProxyHost in class DefaultHttpInputContext

getProxyPort

public int getProxyPort()
Specified by:
getProxyPort in interface HttpInputContext
Overrides:
getProxyPort in class DefaultHttpInputContext

getProxyUsername

public java.lang.String getProxyUsername()
Specified by:
getProxyUsername in interface HttpInputContext
Overrides:
getProxyUsername in class DefaultHttpInputContext

getProxyPassword

public java.lang.String getProxyPassword()
Specified by:
getProxyPassword in interface HttpInputContext
Overrides:
getProxyPassword in class DefaultHttpInputContext

getProxyAuthType

public java.lang.String getProxyAuthType()
Specified by:
getProxyAuthType in interface HttpInputContext
Overrides:
getProxyAuthType in class DefaultHttpInputContext

getProxyAuthRealm

public java.lang.String getProxyAuthRealm()
Specified by:
getProxyAuthRealm in interface HttpInputContext
Overrides:
getProxyAuthRealm in class DefaultHttpInputContext

getWalletLocation

public java.lang.String getWalletLocation()
Description copied from class: DefaultHttpInputContext
SSL
Specified by:
getWalletLocation in interface HttpInputContext
Overrides:
getWalletLocation in class DefaultHttpInputContext

getWalletPassword

public java.lang.String getWalletPassword()
Specified by:
getWalletPassword in interface HttpInputContext
Overrides:
getWalletPassword in class DefaultHttpInputContext

getHeaders

public java.util.Hashtable getHeaders()
Description copied from class: DefaultHttpInputContext
Headers
Specified by:
getHeaders in interface HttpInputContext
Overrides:
getHeaders in class DefaultHttpInputContext

getQueryString

public java.lang.String getQueryString()
Description copied from class: DefaultHttpInputContext
Convert the hashtbale into querystring. The output of this call must be URL encoded already since some parameter values may contain url parameters also. If we do not encoded them, HTTPClient will be confused.
Specified by:
getQueryString in interface HttpInputContext
Overrides:
getQueryString in class DefaultHttpInputContext
See Also:
HttpServletUtil.inheritOrignalParams(javax.servlet.http.HttpServletRequest, java.lang.String), oracle.portal.wcs.transport.http.HttpClientTransportLiaison#getHttpResponse

getParamNames

public java.util.Enumeration getParamNames()
Description copied from class: DefaultHttpInputContext
Returns the enumeration of parameter names
Specified by:
getParamNames in interface HttpInputContext
Overrides:
getParamNames in class DefaultHttpInputContext

getParam

public java.lang.String[] getParam(java.lang.String szName)
Description copied from class: DefaultHttpInputContext
Return the parameter value give a name
Specified by:
getParam in interface HttpInputContext
Overrides:
getParam in class DefaultHttpInputContext

isStateChanged

public boolean isStateChanged()
Description copied from class: DefaultHttpInputContext
This method tells that if this HttpInputContext needs to be added into the ClippingDef.
Specified by:
isStateChanged in interface HttpInputContext
Overrides:
isStateChanged in class DefaultHttpInputContext
See Also:
oracle.portal.wcs.model.UrlModel

setNonStateChanged

public void setNonStateChanged()
Description copied from class: DefaultHttpInputContext
Mark this HttpInputContext to be nonactive.
Specified by:
setNonStateChanged in interface HttpInputContext
Overrides:
setNonStateChanged in class DefaultHttpInputContext
See Also:
HttpClientTransportLiaison

isNew

public boolean isNew()
In provider, every request is new thus consumed time is always calculated
Specified by:
isNew in interface HttpInputContext
Overrides:
isNew in class DefaultHttpInputContext
See Also:
HttpClientTransportLiaison#getHttpResponse

setOld

public void setOld()
never old
Specified by:
setOld in interface HttpInputContext
Overrides:
setOld in class DefaultHttpInputContext

getSessionContext

public TransportSessionContext getSessionContext()
Specified by:
getSessionContext in interface HttpInputContext
Overrides:
getSessionContext in class DefaultHttpInputContext

getTransportLiaison

public HttpTransportLiaison getTransportLiaison()
Description copied from class: DefaultHttpInputContext
The main reason we do not have method setTransportLiaison is to support cluster. The class HttpTransportLiaison is not serializable, and we need to be able to created by its own here.
Specified by:
getTransportLiaison in interface HttpInputContext
Overrides:
getTransportLiaison in class DefaultHttpInputContext

getReader

public java.io.Reader getReader()
                         throws TransportException
Description copied from class: DefaultHttpInputContext
If character set is defined, let super handle it, otherwise, create our own one
Specified by:
getReader in interface InputContext
Overrides:
getReader in class DefaultHttpInputContext
Throws:
TransportException

getTimeout

public int getTimeout()
Description copied from class: DefaultHttpInputContext
Timeout
Specified by:
getTimeout in interface HttpInputContext
Overrides:
getTimeout in class DefaultHttpInputContext

getTimeConsumed

public int getTimeConsumed()
Description copied from class: DefaultHttpInputContext
Get the number of milliseconds consumed for this request
Specified by:
getTimeConsumed in interface HttpInputContext
Specified by:
getTimeConsumed in interface InputContext
Overrides:
getTimeConsumed in class DefaultHttpInputContext

getContentType

public java.lang.String getContentType()
                                throws TransportException
Description copied from class: DefaultHttpInputContext
If the content-type is set by the caller, simply return it. Otherwise, let tranport layer get it. Normally, the content-type is retrieved from the server side as a HTTP header "content-type". However, for certain protocol, such as ftp, there is no content-type from the server. In such case, it's caller's resposibility to call setContentType to set a client-defined value or not to call this method at all. Otherwise, the default value defined by ContentTypeConstants.SZ_DEFAULT_CONTENT_TYPE_WITH_CHARSET is returned.
Specified by:
getContentType in interface InputContext
Overrides:
getContentType in class DefaultHttpInputContext
Throws:
TransportException

getResponseEncoding

public java.lang.String getResponseEncoding()
                                     throws TransportException
Description copied from class: DefaultHttpInputContext
This method could return null for html, since the content-type return could be simple "text/html" However, for javascript, it should not return null, rather, it will return the default one. In some cases, e.g., http://auctions.excite.com the content type from a javascript source is lied to "text/html", however, since we let the caller set the content type for javascript src, we honor the one from caller first.
Specified by:
getResponseEncoding in interface InputContext
Overrides:
getResponseEncoding in class DefaultHttpInputContext
Returns:
the java encoding (corresponded of the charset) from the http header if it's valid.
Throws:
TransportException

setResponseEncoding

public void setResponseEncoding(java.lang.String szEncoding)
                         throws TransportException
Description copied from interface: InputContext
After this call, the engine will not go to external resource to retrieve response charset encoding.
Specified by:
setResponseEncoding in interface InputContext
Overrides:
setResponseEncoding in class DefaultHttpInputContext
Throws:
TransportException

open

public void open()
          throws TransportException
Description copied from class: DefaultHttpInputContext
Opens up the stream so that subsequent calls to getReader will be ok.
Specified by:
open in interface InputContext
Overrides:
open in class DefaultHttpInputContext
Throws:
TransportException

close

public void close()
           throws TransportException
Description copied from class: DefaultHttpInputContext
Relay the call down to the transport
Specified by:
close in interface InputContext
Overrides:
close in class DefaultHttpInputContext
Throws:
TransportException

getEffectiveUri

public java.lang.String getEffectiveUri()
                                 throws TransportException
Description copied from class: DefaultHttpInputContext
Returns the effective uri. Relay it down to the transport
Specified by:
getEffectiveUri in interface InputContext
Overrides:
getEffectiveUri in class DefaultHttpInputContext
Throws:
TransportException

getResponseHeaders

public java.util.Hashtable getResponseHeaders()
                                       throws TransportException
Specified by:
getResponseHeaders in interface HttpInputContext
Overrides:
getResponseHeaders in class DefaultHttpInputContext
Throws:
TransportException

getResponseStatus

public int getResponseStatus()
                      throws TransportException
Specified by:
getResponseStatus in interface HttpInputContext
Overrides:
getResponseStatus in class DefaultHttpInputContext
Throws:
TransportException

getResponseCookies

public javax.servlet.http.Cookie[] getResponseCookies()
Specified by:
getResponseCookies in interface HttpInputContext
Overrides:
getResponseCookies in class DefaultHttpInputContext

getInputStream

public java.io.InputStream getInputStream()
                                   throws TransportException
Description copied from class: AbstractInputContext
This method needs to be implemented by all subclasses in case they depend on getReader from this class.
Specified by:
getInputStream in interface InputContext
Overrides:
getInputStream in class DefaultHttpInputContext
Throws:
TransportException

Skip navigation links

Oracle® WebLogic Server Web Clipping Transport API Reference
11g Release 1 (11.1.1)

E14346-01


Copyright © 2003, 2009, Oracle Corporation. All Rights Reserved