oss.net.pstream
Class PortletStream

java.lang.Object
  |
  +--oss.net.pstream.PortletStream

public class PortletStream
extends java.lang.Object

Easy-to-use(R) interface to all the PortletStreams functionality.

Title: Portlet Streams

Description: A simple utility library to stream content from a URL connection into an application.

Copyright: Copyright (c) 2002 LGPL

Author:
Matt Gregory

Constructor Summary
PortletStream(boolean Debug)
           
 
Method Summary
 void execute(org.apache.commons.httpclient.HttpClient Client, org.apache.commons.httpclient.HttpMethodBase method, PortletStreamParameters Params, javax.servlet.http.HttpServletRequest Request)
          Like the execute above, except that the Response is not passed and, concequently, not modified.
 void execute(org.apache.commons.httpclient.HttpClient Client, org.apache.commons.httpclient.HttpMethodBase method, PortletStreamParameters Params, javax.servlet.http.HttpServletRequest Request, javax.servlet.http.HttpServletResponse Response)
          A one-stop method to build out the parms, run the prefetch rewrite, execute the method, run the postfetch rewrite and set the response headers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortletStream

public PortletStream(boolean Debug)
              throws PortletStreamException
Parameters:
Debug - turns on/off debuging for the streamer.
Method Detail

execute

public void execute(org.apache.commons.httpclient.HttpClient Client,
                    org.apache.commons.httpclient.HttpMethodBase method,
                    PortletStreamParameters Params,
                    javax.servlet.http.HttpServletRequest Request,
                    javax.servlet.http.HttpServletResponse Response)
             throws PortletStreamException
A one-stop method to build out the parms, run the prefetch rewrite, execute the method, run the postfetch rewrite and set the response headers.

Parameters:
Client - The HttpClient used to execute the method.
method - The HttpMethodBase to be executed.
Params - The @link oss.net.pstream.PortletStreamParameters which will contain the state of this proxy until it has finished execution.
Throws:
PortletStreamException - if anything goes wrong while proxying the request. There are many possible causes, but the root exception will always be embedded inside of this exception.

execute

public void execute(org.apache.commons.httpclient.HttpClient Client,
                    org.apache.commons.httpclient.HttpMethodBase method,
                    PortletStreamParameters Params,
                    javax.servlet.http.HttpServletRequest Request)
             throws PortletStreamException
Like the execute above, except that the Response is not passed and, concequently, not modified. This method should be used from JSP pages where setting the response headers can cause unpredictable results.

Parameters:
Client - the HttpClient which provides the connection on which to execute the method.
method - The HttpMethod which will be used to proxy the request.
Params - The Parameters which will preserve the state of the proxy during the duration of the proxy.
Request - The HttpServletRequest which will be used to build the proxy method headers and parameters.
Throws:
PortletStreamException - If anything goes wrong. The root exception will be contained inside of this exception.


Copyright © 2000 Dummy Corp. All Rights Reserved.