| org.apache.cocoon.generation.AbstractGenerator org.apache.cocoon.generation.ServiceableGenerator org.apache.cocoon.generation.EventCacheGenerator
EventCacheGenerator | public class EventCacheGenerator extends ServiceableGenerator implements Configurable,CacheableProcessingComponent(Code) | | Generator wrapper that forwards generation to
to its delegate but overides its caching strategy
by replacing it with an event-cache aware implementation.
Sitemap configuration is as follows:
<map:generator name="event-cache" src="org.apache.cocoon.generation.EventCacheGenerator" >
<factory name="my-event" value="com.my.EventFactoryImpl" />
<factory name="my-other-event" value="com.myother.EventFactoryImpl" />
</map:generator>
Two event types are preconfigured: NamedEvent (name="named") and NameValueEvent
(name="name-value").
Pipeline usage is as follows:
<map:generate type="event-cache" src="delegate-src">
<map:parameter name="delegate" value="delegate-type" />
<map:parameter name="event-type" value="my-event" />
<!-- my event parameters -->
<map:parameter name="event-name" value="some name" />
<map:parameter name="event-value" value="some value" />
</map:generate>
The two preconfigured event types take the following parameters:
- event-type 'named': parameter 'event-name'
- event-type 'name-value': parameter 'event-name' and parameter 'event-value'
The src attribute and all parameters are passed as is to delegate generator.
TODO: share common code with EventCacheTransformer
author: Unico Hommes |
DELEGATE_PARAM | final public static String DELEGATE_PARAM(Code) | | |
EVENT_TYPE_DEFAULT | final public static String EVENT_TYPE_DEFAULT(Code) | | |
EVENT_TYPE_PARAM | final public static String EVENT_TYPE_PARAM(Code) | | |
FACTORY_NAME_CONF | final public static String FACTORY_NAME_CONF(Code) | | |
FACTORY_NAME_TYPE | final public static String FACTORY_NAME_TYPE(Code) | | |
NAMED_EVENT_TYPE | final public static String NAMED_EVENT_TYPE(Code) | | |
NAME_VALUE_EVENT_TYPE | final public static String NAME_VALUE_EVENT_TYPE(Code) | | |
configure | public void configure(Configuration configuration) throws ConfigurationException(Code) | | |
dispose | public void dispose()(Code) | | |
getValidity | public SourceValidity getValidity()(Code) | | |
recycle | public void recycle()(Code) | | |
service | public void service(ServiceManager manager) throws ServiceException(Code) | | |
Fields inherited from org.apache.cocoon.generation.ServiceableGenerator | protected ServiceManager manager(Code)(Java Doc)
|
Methods inherited from org.apache.cocoon.generation.ServiceableGenerator | public void dispose()(Code)(Java Doc) public void service(ServiceManager manager) throws ServiceException(Code)(Java Doc)
|
|
|