Package org.apache.turbine.pipeline
Class DefaultPipelineData
- java.lang.Object
-
- org.apache.turbine.pipeline.DefaultPipelineData
-
- All Implemented Interfaces:
AutoCloseable
,PipelineData
- Direct Known Subclasses:
DefaultTurbineRunData
public class DefaultPipelineData extends Object implements PipelineData
A PipelineData is a holder for data being passed from one Valve to the next. The detailed contract for a Valve is included in the description of the
HISTORICAL NOTE: The "PipelineData" name was assigned to this holder as it functions similarly to the RunData object, but without the additional methodsinvoke()
method below.- Author:
- Eric Pugh, Peter Courcoux
-
-
Constructor Summary
Constructors Constructor Description DefaultPipelineData()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Put object back into RunDataService for recyclingMap<Class<?>,? super Object>
get(Class<?> key)
Get the configured map of objects for the given key<T> T
get(Class<?> key, Class<T> innerKey)
Get a value from the configured map of objects for the given keysvoid
put(Class<?> key, Map<Class<?>,? super Object> value)
Put a configured map of objects into the pipeline data object-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.turbine.pipeline.PipelineData
getRunData
-
-
-
-
Constructor Detail
-
DefaultPipelineData
public DefaultPipelineData()
-
-
Method Detail
-
put
public void put(Class<?> key, Map<Class<?>,? super Object> value)
Put a configured map of objects into the pipeline data object- Specified by:
put
in interfacePipelineData
- Parameters:
key
- the key classvalue
- the value map
-
get
public Map<Class<?>,? super Object> get(Class<?> key)
Get the configured map of objects for the given key- Specified by:
get
in interfacePipelineData
- Parameters:
key
- the key class- Returns:
- the value map or null if no such key exists
-
get
public <T> T get(Class<?> key, Class<T> innerKey)
Get a value from the configured map of objects for the given keys- Specified by:
get
in interfacePipelineData
- Type Parameters:
T
- the type of the inner key- Parameters:
key
- the key classinnerKey
- the key into the value map- Returns:
- the inner value or null if no such keys exist
-
close
public void close() throws Exception
Put object back into RunDataService for recycling- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-
-