Skip navigation links

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

E14346-01


oracle.portal.wcs.transport.http
Interface HttpInputContext

All Superinterfaces:
InputContext, java.io.Serializable
All Known Subinterfaces:
WcrHttpInputContext
All Known Implementing Classes:
DefaultHttpInputContext, DefaultWcrHttpInputContext

public interface HttpInputContext
extends InputContext

This is an abstraction at Studio time to let any transportation layer to fire off the HTTP request and get the response back. Currently, we only test it against HTTPClient package. The implementation for Provider mode is WcrHttpInputContext. Note: At Studio mode, if the request gets 401 error, a new HttpInputContext will be created the handle the credential entered by the user.


Field Summary

 

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

 

Method Summary
 void addParam(java.lang.String szName, java.lang.String szValue)
          Http parameters.
 void addParam(java.lang.String szName, java.lang.String[] szValues)
           
 java.lang.String getAuthPassword()
           
 java.lang.String getAuthRealm()
          The realm of the http authorization
 java.lang.String getAuthType()
          This method must be called first to check the supported auth type
 java.lang.String getAuthUsername()
          This method must be called before any other calls except getAuthType()
 java.util.Hashtable getHeaders()
          Headers
 java.lang.String getMethod()
          Http method
 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
 java.util.Hashtable getParams()
          Returns the hashtbale containing parameter name-value(s) pairs
 java.lang.String getProxyAuthRealm()
           
 java.lang.String getProxyAuthType()
           
 java.lang.String getProxyHost()
          Proxy information
 java.lang.String getProxyPassword()
           
 int getProxyPort()
           
 java.lang.String getProxyUsername()
           
 java.lang.String getQueryString()
          Convert the hashtbale into querystring.
 javax.servlet.http.Cookie[] getResponseCookies()
           
 java.util.Hashtable getResponseHeaders()
           
 int getResponseStatus()
           
 TransportSessionContext getSessionContext()
           
 int getTimeConsumed()
          Get the number of milliseconds consumed for this request
 int getTimeout()
          Timeout, must not be negative
 HttpTransportLiaison getTransportLiaison()
          The factory method to create Transport layer
 java.security.Principal getUser()
          Gets the principal -used by the TransportLiaison to much with transport
 java.lang.String getWalletLocation()
          SSL
 java.lang.String getWalletPassword()
           
 boolean isNew()
          This method tells that if this HttpInputContext is a new one (browse) or the reused one (section, clip, backwards and forwards)
 boolean isStateChanged()
          This method tells that if this HttpInputContext needs to be added into the ClippingDef.
 void setAuthPassword(java.lang.String szPwd)
           
 void setAuthRealm(java.lang.String szAuthRealm)
          set in HttpClientTransportLiaison.getHeaders() which is part of the HTTP Authorization challenge.
 void setAuthType(java.lang.String szType)
          This value should be set either from 401 error or from repository
 void setAuthUsername(java.lang.String szUsername)
           
 void setHeaders(java.util.Hashtable htHeaders)
           
 void setNonStateChanged()
          Mark this HttpInputContext to be nonactive.
 void setOld()
           
 void setSessionContext(TransportSessionContext tsc)
          Http session context.
 void setUrl(java.lang.String szUrl)
          Only supposed to use for SSO effective URL support
 void setUser(java.security.Principal user)
          Sets the principal so that the implementationof the HttpTransportLiaison can use that Principal to fetch other tokens required for authentication.
 java.lang.String toString()
           

 

Methods inherited from interface oracle.portal.wcs.transport.InputContext
close, getContentType, getEffectiveUri, getInputStream, getReader, getRequestEncoding, getResponseEncoding, getUrl, open, setContentType, setRequestEncoding, setResponseEncoding

 

Method Detail

getTransportLiaison

HttpTransportLiaison getTransportLiaison()
The factory method to create Transport layer

setUser

void setUser(java.security.Principal user)
Sets the principal so that the implementationof the HttpTransportLiaison can use that Principal to fetch other tokens required for authentication.

getUser

java.security.Principal getUser()
Gets the principal -used by the TransportLiaison to much with transport

setUrl

void setUrl(java.lang.String szUrl)
Only supposed to use for SSO effective URL support

addParam

void addParam(java.lang.String szName,
              java.lang.String szValue)
Http parameters. The caller of this method is from WcrBrowseUrl, which retrieves the name-value pair from database. And they should be already encoded/escaped by right encoding.
See Also:
WcrBrowseUrl.getHttpInputContext(), WcRepository.getClippingDef(oracle.portal.wcs.ClippingKey)

addParam

void addParam(java.lang.String szName,
              java.lang.String[] szValues)

getParams

java.util.Hashtable getParams()
Returns the hashtbale containing parameter name-value(s) pairs

getParamNames

java.util.Enumeration getParamNames()
Returns the enumeration of parameter names

getParam

java.lang.String[] getParam(java.lang.String szName)
Return the parameter value give a name

getMethod

java.lang.String getMethod()
Http method

getAuthType

java.lang.String getAuthType()
                             throws HttpTransportException
This method must be called first to check the supported auth type

In HTTP scenaroir, there could be two levels of Authentications, one for http proxy server, and the other the actual web site. Currently, we only support one of them, i.e., you can not visit a web site needing authentication via a proxy server needing authentication too. Or, does this scenaroir exist in the real world? Can browser handler it? The one different behavior against browser is that now we can not use the HTTP Authorization header directly for Basic since the realm is not part of it. Therefore, if there are two clips access a restricted website, user needs to log in twice.

Throws:
- - if authentication type not equals to Basic or Digest
HttpTransportException

setAuthType

void setAuthType(java.lang.String szType)
This value should be set either from 401 error or from repository

getAuthUsername

java.lang.String getAuthUsername()
This method must be called before any other calls except getAuthType()

setAuthUsername

void setAuthUsername(java.lang.String szUsername)

getAuthPassword

java.lang.String getAuthPassword()

setAuthPassword

void setAuthPassword(java.lang.String szPwd)

getAuthRealm

java.lang.String getAuthRealm()
The realm of the http authorization

setAuthRealm

void setAuthRealm(java.lang.String szAuthRealm)
set in HttpClientTransportLiaison.getHeaders() which is part of the HTTP Authorization challenge.

getProxyHost

java.lang.String getProxyHost()
Proxy information

getProxyPort

int getProxyPort()

getProxyUsername

java.lang.String getProxyUsername()

getProxyPassword

java.lang.String getProxyPassword()

getProxyAuthType

java.lang.String getProxyAuthType()

getProxyAuthRealm

java.lang.String getProxyAuthRealm()

getWalletLocation

java.lang.String getWalletLocation()
SSL

getWalletPassword

java.lang.String getWalletPassword()

getHeaders

java.util.Hashtable getHeaders()
Headers

setHeaders

void setHeaders(java.util.Hashtable htHeaders)

getQueryString

java.lang.String getQueryString()
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. Note: put a temp fix to reservse the order of the parameters to support http://www.excite.com search. Since at runtime, we also use hashtable, we guarrantee that the order of the parameters at both Studio and Provider mode is the same.
See Also:
HttpServletUtil.inheritOrignalParams(javax.servlet.http.HttpServletRequest, java.lang.String), oracle.portal.wcs.transport.http.HttpClientTransportLiaison#getHttpResponse

setSessionContext

void setSessionContext(TransportSessionContext tsc)
Http session context. If not null, use it as the key for Cookies to be sent to http server.

getSessionContext

TransportSessionContext getSessionContext()

getTimeout

int getTimeout()
Timeout, must not be negative

getTimeConsumed

int getTimeConsumed()
Get the number of milliseconds consumed for this request
Specified by:
getTimeConsumed in interface InputContext

toString

java.lang.String toString()
Overrides:
toString in class java.lang.Object

getResponseHeaders

java.util.Hashtable getResponseHeaders()
                                       throws TransportException
Throws:
TransportException

getResponseStatus

int getResponseStatus()
                      throws TransportException
Throws:
TransportException

getResponseCookies

javax.servlet.http.Cookie[] getResponseCookies()

isStateChanged

boolean isStateChanged()
This method tells that if this HttpInputContext needs to be added into the ClippingDef.
See Also:
oracle.portal.wcs.model.UrlModel

setNonStateChanged

void setNonStateChanged()
Mark this HttpInputContext to be nonactive.
See Also:
HttpClientTransportLiaison

isNew

boolean isNew()
This method tells that if this HttpInputContext is a new one (browse) or the reused one (section, clip, backwards and forwards)
See Also:
HttpClientTransportLiaison

setOld

void setOld()

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