com.ibm.websphere.servlet.filter
Class ServletChain
java.lang.Object
|
+--com.ibm.websphere.servlet.filter.ServletChain
- All Implemented Interfaces:
- javax.servlet.RequestDispatcher
- public class ServletChain
- extends java.lang.Object
- implements javax.servlet.RequestDispatcher
Object that chains the responses of servlets together.
A servlet chain acts as a response pipe that allows servlets
to filter the output of the previous servlet in the chain.
When a servlet writes header or output stream data to the response,
this data is fed into a chained request object that will be passed
to the next servlet in the chain. The next servlet can examine the
contents of the chained request to see the response that was
generated by the previous servlet. The data written by the last
servlet in the chain will be sent back to the client.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServletChain
public ServletChain()
ServletChain
public ServletChain(javax.servlet.RequestDispatcher[] dispatchers)
addRequestDispatcher
public void addRequestDispatcher(javax.servlet.RequestDispatcher rd)
addRequestDispatcher
public void addRequestDispatcher(int index,
javax.servlet.RequestDispatcher rd)
clear
public void clear()
containsRequestDispatcher
public boolean containsRequestDispatcher(javax.servlet.RequestDispatcher rd)
enumeration
public java.util.Enumeration enumeration()
getRequestDispatcher
public javax.servlet.RequestDispatcher getRequestDispatcher(int index)
indexOf
public int indexOf(javax.servlet.RequestDispatcher rd)
isEmpty
public boolean isEmpty()
removeRequestDispatcher
public boolean removeRequestDispatcher(javax.servlet.RequestDispatcher rd)
removeRequestDispatcher
public javax.servlet.RequestDispatcher removeRequestDispatcher(int index)
setRequestDispatcher
public javax.servlet.RequestDispatcher setRequestDispatcher(int index,
javax.servlet.RequestDispatcher rd)
size
public int size()
forward
public void forward(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse resp)
throws javax.servlet.ServletException,
java.io.IOException
- Specified by:
forward
in interface javax.servlet.RequestDispatcher
include
public void include(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse resp)
throws javax.servlet.ServletException,
java.io.IOException
- Specified by:
include
in interface javax.servlet.RequestDispatcher
chainRequestDispatchers
public static void chainRequestDispatchers(javax.servlet.RequestDispatcher[] dispatchers,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
- Chain the responses of a set of request dispatchers together.