Skip navigation links


com.bea.wsrp.consumer.resource
Interface IResourceServletRequestContext


public interface IResourceServletRequestContext

A representation a resource request. It is used by IResourceServletInterceptor implementations.

See Also
IResourceServletInterceptor
This interface is intended to be implemented only by Oracle Weblogic Portal. Oracle Systems reserves the right to add abstract methods to this interface without notice. Implementations of this interface by other parties must not be expected to compile without change in future versions of Oracle Weblogic Portal.

Method Summary
 String getForwardPath()
          Get the path used to create a request dispatcher.
 javax.servlet.http.HttpServletRequest getHttpServletRequest()
          Get the HttpServletRequest which represents the connection from the browser.
 javax.servlet.http.HttpServletResponse getHttpServletResponse()
          Get the HttpServeltResponse representing the connection to the browser.
 byte[] getReadInput()
          Get the bytes which have been read from the request's input stream.
 javax.servlet.ServletConfig getServletConfig()
          Utility method for getting the ServletConfig
 javax.servlet.ServletContext getServletContext()
          Utility method for getting the servlet context
 Set<String> getSkipParameterNames()
          The set of parameters whose names should be skipped.
 URL getTargetURL()
          Get the target's URL
 HttpURLConnection getURLConnection()
          Get the URL Connection so it may be modified.
 boolean isForwardRequest()
          Should this request be handled via a RequestDispatcher.forward() instead of a URLConnection?
 void setForwardPath(String path)
          Set the path used to create a request dispatcher to forward to.
 void setForwardRequest(boolean forward)
          Set whether the request should be made via the request dispatcher.
 void setHttpServletRequest(javax.servlet.http.HttpServletRequest request)
          Set the request.
 void setHttpServletResponse(javax.servlet.http.HttpServletResponse response)
          Set the response.
 void setReadInput(byte[] in)
          Set the bytes which have been read from the request for sending in the target request.
 void setTargetURL(URL target)
          Set the target's URL.
 void setURLConnection(HttpURLConnection connection)
          Set the URL connection.
 boolean skipParameter(String parameter)
          Should the parameter be skipped (not sent to the target).

 

Method Detail

getHttpServletRequest

javax.servlet.http.HttpServletRequest getHttpServletRequest()
Get the HttpServletRequest which represents the connection from the browser.
Returns
the original request or the value passed to setHttpServletRequest().
See Also
setHttpServletRequest(HttpServletRequest)

setHttpServletRequest

void setHttpServletRequest(javax.servlet.http.HttpServletRequest request)
Set the request. Most likely this will be a HttpServletRequestWrapper
Parameters
request - The request to be used for further processing
See Also
getHttpServletRequest(), HttpServletRequestWrapper

getHttpServletResponse

javax.servlet.http.HttpServletResponse getHttpServletResponse()
Get the HttpServeltResponse representing the connection to the browser.
Returns
The original response or the value passed to setHttpServletResponse().
See Also
setHttpServletResponse(HttpServletResponse)

setHttpServletResponse

void setHttpServletResponse(javax.servlet.http.HttpServletResponse response)
Set the response. Most likely this will be a HtppServletResponseWrapper
Parameters
response - The response to be used for further processing
See Also
getHttpServletResponse(), HttpServletResponseWrapper

getServletConfig

javax.servlet.ServletConfig getServletConfig()
Utility method for getting the ServletConfig
Returns
The servlet's config

getServletContext

javax.servlet.ServletContext getServletContext()
Utility method for getting the servlet context
Returns
the servletContext

getReadInput

byte[] getReadInput()
Get the bytes which have been read from the request's input stream. This is necessary to avoid call to getParameter() from corrupting the original stream.
Returns
Any bytes read from the input stream or null if none have been read
See Also
ServletRequest.getParameter(String)

setReadInput

void setReadInput(byte[] in)
Set the bytes which have been read from the request for sending in the target request.
Parameters
in - The bytes which will be sent to the target.

isForwardRequest

boolean isForwardRequest()
Should this request be handled via a RequestDispatcher.forward() instead of a URLConnection?
Returns
True if this request will be made via the RequestDispatcher
See Also
RequestDispatcher.forward(ServletRequest, javax.servlet.ServletResponse), URLConnection

setForwardRequest

void setForwardRequest(boolean forward)
Set whether the request should be made via the request dispatcher.
Parameters
forward - True if the the request should be made via the request dispatcher

getForwardPath

String getForwardPath()
Get the path used to create a request dispatcher.
Returns
The path to forward to or null.

setForwardPath

void setForwardPath(String path)
Set the path used to create a request dispatcher to forward to.
Note: This is only useful when isForwardRequest() returns true.
Parameters
path - The path (should not contain the context-path) to forward to.
See Also
isForwardRequest()

getTargetURL

URL getTargetURL()
Get the target's URL
Returns
The target's URL or null if there is no such URL

setTargetURL

void setTargetURL(URL target)
Set the target's URL.
Parameters
target - The URL to the target resource
Note: This is only useful when isForwardRequest() returns false.
Note: Calling this will create a new URL Connection, all previous modification to the URLConenction via getURLConnection() and setURLConnection() will be lost.
See Also
getURLConnection(), setURLConnection(HttpURLConnection)

getURLConnection

HttpURLConnection getURLConnection()
                                   throws IOException
Get the URL Connection so it may be modified.
Returns
The URL connection.
Throws
IOException - If the URL is invalid or other problems cause the URL not to be created.
Note: Calling setTargetURL() will create a new URL Connection, all previous modification to the URLConenction will be lost.
See Also
setTargetURL(URL)

setURLConnection

void setURLConnection(HttpURLConnection connection)
Set the URL connection.
Parameters
connection - The connection to use for getting the target.
Note: This is only useful when isForwardRequest() returns false.
Note: Calling setTargetURL() will create a new URL Connection, all previous modification to the URLConenction will be lost.
See Also
setTargetURL(URL)

skipParameter

boolean skipParameter(String parameter)
Should the parameter be skipped (not sent to the target).
Parameters
parameter - The parameter's name
Returns
true if the parameter should be skipped

getSkipParameterNames

Set<String> getSkipParameterNames()
The set of parameters whose names should be skipped.
Returns
A Set of parameter names which will be skipped.

Skip navigation links


Copyright © 2010, Oracle. All rights reserved.