public interface Pipeline
| Modifier and Type | Method and Description |
|---|---|
void |
addValve(Valve valve)
Add a new Valve to the end of the pipeline.
|
Valve |
getFirstValveOfClass(Class<Valve> c)
Return the first valve of the pipeline that is an instance
of a given class or interface.
|
Valve[] |
getValves()
Return the set of all Valves in the pipeline.
|
boolean |
hasValveOfClass(Class<Valve> c)
Tell if (at least) one of the valves of the pipeline is an instance
of a given class or interface.
|
void |
initialize() |
void |
invoke(Object context)
Cause the specified request and response to be processed by
the sequence of Valves associated with this pipeline, until one
of these Valves decides to end the processing.
|
void |
removeValve(Valve valve)
Remove the specified Valve from the pipeline, if it is found;
otherwise, do nothing.
|
void |
setEnvironment(Map<String,Object> environment)
Used by users of the pipeline to provide an environment in which the valves
will execute.
|
void initialize()
throws PipelineException
PipelineExceptionvoid addValve(Valve valve)
Add a new Valve to the end of the pipeline.
valve - Valve to be added.IllegalStateException - If the pipeline has not been
initialized.Valve[] getValves()
Return the set of all Valves in the pipeline. If there are no such Valves, a zero-length array is returned.
void invoke(Object context) throws PipelineException
Cause the specified request and response to be processed by the sequence of Valves associated with this pipeline, until one of these Valves decides to end the processing.
The implementation must ensure that multiple simultaneous requests (on different threads) can be processed through the same Pipeline without interfering with each other's control flow.
context - The run-time information, including the servlet
request and response we are processing.PipelineException - an input/output error occurred.void removeValve(Valve valve)
Remove the specified Valve from the pipeline, if it is found; otherwise, do nothing.
valve - Valve to be removed.boolean hasValveOfClass(Class<Valve> c)
Tell if (at least) one of the valves of the pipeline is an instance of a given class or interface.
c - the class or interfaceValve getFirstValveOfClass(Class<Valve> c)
Return the first valve of the pipeline that is an instance of a given class or interface.
c - the class or interfaceCopyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.