Skip navigation links

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

E14346-01


oracle.portal.wcs.transport
Class AbstractInputContext

java.lang.Object
  extended by oracle.portal.wcs.transport.AbstractInputContext

All Implemented Interfaces:
java.io.Serializable, ContentTypeConstants, InputContext
Direct Known Subclasses:
DefaultHttpInputContext

public abstract class AbstractInputContext
extends java.lang.Object
implements InputContext, ContentTypeConstants
See Also:
Serialized Form

Field Summary
protected  java.io.Reader m_r
           
protected  java.lang.String m_szContentType
           
protected  java.lang.String m_szReqEncoding
           
protected  java.lang.String m_szRespEncoding
           

 

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

 

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
AbstractInputContext()
           

 

Method Summary
abstract  void close()
          The interface for GC
 java.lang.String getContentType()
          Normally, the content-type is retrived from the server side as a HTTP header "content-type".
abstract  java.lang.String getEffectiveUri()
          The Effective URI
abstract  java.io.InputStream getInputStream()
          This method needs to be implemented by all subclasses in case they depend on getReader from this class.
 java.io.Reader getReader()
          Should determine the character set and then create the right reader
 java.lang.String getRequestEncoding()
          Get the encoding of the request parameters.
 java.lang.String getResponseEncoding()
          Get the encoding of the input
 int getTimeConsumed()
          get the time to first byte (latency) this input context in milliseconds
 java.lang.String getUrl()
          Each InputContext should have a URL to associate with
abstract  void open()
          Opens up the stream so that subsequent calls to getReader will be ok.
 void setContentType(java.lang.String szContentType)
          This method can be called if the caller already known the content-type of this InputContext.
 void setRequestEncoding(java.lang.String szEncoding)
           
 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

m_szContentType

protected java.lang.String m_szContentType

m_szRespEncoding

protected java.lang.String m_szRespEncoding

m_szReqEncoding

protected java.lang.String m_szReqEncoding

m_r

protected transient java.io.Reader m_r

Constructor Detail

AbstractInputContext

public AbstractInputContext()

Method Detail

getUrl

public java.lang.String getUrl()
Description copied from interface: InputContext
Each InputContext should have a URL to associate with
Specified by:
getUrl in interface InputContext

getContentType

public java.lang.String getContentType()
                                throws TransportException
Description copied from interface: InputContext
Normally, the content-type is retrived from the server side as a HTTP header "content-type". Please also note that the charset information is embedded in content-type. For HTML case, the more accurate content-type if from However, for certain protocol, such as ftp, there is no content-type from the server. And for javascript case, the content type from server sometimes is not correct. If setContentType is called, this method simply returns it, Otherwise, it will call the transport layer to get the content-type from the external source.
Specified by:
getContentType in interface InputContext
Throws:
TransportException

setContentType

public void setContentType(java.lang.String szContentType)
This method can be called if the caller already known the content-type of this InputContext. Right now, it's mainly used to set content type for javascript source. However, in the real world, there exists an inconsistance between the source content and the content type given from the source. Sometimes, javascript souce gives back html content, but lies its content-type to be html/text, or vice versa. In these two cases, we fail in the parsing, since we pick up parser based on content type.
Specified by:
setContentType in interface InputContext
See Also:
StudioJsJspClient#handleStudioAction, ProviderJsJspClient#show

getResponseEncoding

public java.lang.String getResponseEncoding()
                                     throws TransportException
Description copied from interface: InputContext
Get the encoding of the input
Specified by:
getResponseEncoding in interface InputContext
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
Throws:
TransportException

getRequestEncoding

public java.lang.String getRequestEncoding()
Get the encoding of the request parameters. Note: not supported yet. This parameter is to be used to support NLS sites with specific encoding of the url parameters. Right now, it's default to ISO-8895-1 unless caller sets it.
Specified by:
getRequestEncoding in interface InputContext

setRequestEncoding

public void setRequestEncoding(java.lang.String szEncoding)
Specified by:
setRequestEncoding in interface InputContext

getReader

public java.io.Reader getReader()
                         throws TransportException
Description copied from interface: InputContext
Should determine the character set and then create the right reader
Specified by:
getReader in interface InputContext
Throws:
TransportException

open

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

close

public abstract void close()
                    throws TransportException
The interface for GC
Specified by:
close in interface InputContext
Throws:
TransportException

getEffectiveUri

public abstract java.lang.String getEffectiveUri()
                                          throws TransportException
The Effective URI
Specified by:
getEffectiveUri in interface InputContext
Throws:
TransportException

getTimeConsumed

public int getTimeConsumed()
Description copied from interface: InputContext
get the time to first byte (latency) this input context in milliseconds
Specified by:
getTimeConsumed in interface InputContext

getInputStream

public abstract java.io.InputStream getInputStream()
                                            throws TransportException
This method needs to be implemented by all subclasses in case they depend on getReader from this class.
Specified by:
getInputStream in interface InputContext
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