Skip navigation links

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

E14346-01


oracle.portal.wcs.transport
Interface InputContext

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

public interface InputContext
extends java.io.Serializable

Field Summary
static int BUFFER_SIZE
          The buffer size for all Input (this is the default from JavaCC)

 

Method Summary
 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".
 java.lang.String getEffectiveUri()
          The Effective URI
 java.io.InputStream getInputStream()
          In case that input is binary
 java.io.Reader getReader()
          Should determine the character set and then create the right reader
 java.lang.String getRequestEncoding()
           
 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
 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.

 

Field Detail

BUFFER_SIZE

static final int BUFFER_SIZE
The buffer size for all Input (this is the default from JavaCC)
See Also:
Constant Field Values

Method Detail

getUrl

java.lang.String getUrl()
Each InputContext should have a URL to associate with

getContentType

java.lang.String getContentType()
                                throws TransportException
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.
Throws:
TransportException

setContentType

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.
See Also:
StudioJsJspClient#handleStudioAction, ProviderJsJspClient#show

getResponseEncoding

java.lang.String getResponseEncoding()
                                     throws TransportException
Get the encoding of the input
Throws:
TransportException

setResponseEncoding

void setResponseEncoding(java.lang.String szEncoding)
                         throws TransportException
After this call, the engine will not go to external resource to retrieve response charset encoding.
Throws:
TransportException

getRequestEncoding

java.lang.String getRequestEncoding()

setRequestEncoding

void setRequestEncoding(java.lang.String szEncoding)

getReader

java.io.Reader getReader()
                         throws TransportException
Should determine the character set and then create the right reader
Throws:
TransportException

getInputStream

java.io.InputStream getInputStream()
                                   throws TransportException
In case that input is binary
Throws:
TransportException

open

void open()
          throws TransportException
Opens up the stream so that subsequent calls to getReader will be ok.
Throws:
TransportException

close

void close()
           throws TransportException
The interface for GC
Throws:
TransportException

getEffectiveUri

java.lang.String getEffectiveUri()
                                 throws TransportException
The Effective URI
Throws:
TransportException

getTimeConsumed

int getTimeConsumed()
get the time to first byte (latency) this input context in milliseconds

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