|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.logger.AbstractLogEnabled org.apache.cocoon.portal.coplet.adapter.impl.AbstractCopletAdapter org.apache.cocoon.portal.coplet.adapter.impl.URICopletAdapter org.apache.cocoon.portal.coplet.adapter.impl.CachingURICopletAdapter
public class CachingURICopletAdapter
This adapter extends the URICopletAdapter
by a caching mechanism. The result of the called uri/pipeline is cached until a
CopletInstanceEvent
for that coplet instance
is received.
The content can eiter be cached in the user session or globally. The default is
the user session.
Field Summary | |
---|---|
protected Cache |
cache
The cache to use for global caching. |
static String |
CACHE
The temporary attribute name for the storing the cached coplet content. |
static String |
CONFIGURATION_CACHE_GLOBAL
The configuration name for using the global cache. |
static String |
CONFIGURATION_CACHE_GLOBAL_USE_ATTRIBUTES
The configuration name for querying instance attributes to generate the key for the global cache. |
static String |
CONFIGURATION_ENABLE_CACHING
The configuration name for enabling/disabling the cache. |
static String |
CONFIGURATION_IGNORE_SIZING_EVENTS
The configuration name for ignoring sizing events to clear the cache. |
static String |
DO_NOT_CACHE
This temporary attribute can be set on the instance to not cache the current response. |
protected Boolean |
enableCaching
Is caching enabled? |
static String |
PARAMETER_DISABLE_CACHING
Deprecated. Use coplet base data configuration. |
Fields inherited from class org.apache.cocoon.portal.coplet.adapter.impl.URICopletAdapter |
---|
context, resolver |
Fields inherited from class org.apache.cocoon.portal.coplet.adapter.impl.AbstractCopletAdapter |
---|
manager |
Fields inherited from interface org.apache.cocoon.portal.coplet.adapter.CopletAdapter |
---|
ROLE |
Constructor Summary | |
---|---|
CachingURICopletAdapter()
|
Method Summary | |
---|---|
void |
dispose()
|
protected String |
getCacheKey(CopletInstanceData coplet,
String uri)
Build the key for the global cache. |
void |
handleCopletInstanceEvent(CopletInstanceEvent event)
This adapter listens for CopletInstanceEvents. |
void |
inform(CopletInstanceEvent e,
PortalService service)
|
protected boolean |
isSizingEvent(CopletInstanceEvent event)
Tests if the event is a sizing event for the coplet. |
void |
parameterize(Parameters parameters)
|
void |
service(ServiceManager manager)
|
void |
streamContent(CopletInstanceData coplet,
ContentHandler contentHandler)
Implement this and not toSAX() |
void |
streamContent(CopletInstanceData coplet,
String uri,
ContentHandler contentHandler)
|
Methods inherited from class org.apache.cocoon.portal.coplet.adapter.impl.URICopletAdapter |
---|
contextualize, initialize, renderErrorContent |
Methods inherited from class org.apache.cocoon.portal.coplet.adapter.impl.AbstractCopletAdapter |
---|
destroy, getConfiguration, getConfiguration, init, login, logout, toSAX |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CONFIGURATION_ENABLE_CACHING
public static final String CONFIGURATION_CACHE_GLOBAL
public static final String CONFIGURATION_CACHE_GLOBAL_USE_ATTRIBUTES
public static final String CONFIGURATION_IGNORE_SIZING_EVENTS
public static final String CACHE
public static final String DO_NOT_CACHE
public static final String PARAMETER_DISABLE_CACHING
protected Boolean enableCaching
protected Cache cache
Constructor Detail |
---|
public CachingURICopletAdapter()
Method Detail |
---|
public void parameterize(Parameters parameters)
parameterize
in interface Parameterizable
Parameterizable.parameterize(org.apache.avalon.framework.parameters.Parameters)
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
service
in class URICopletAdapter
ServiceException
Serviceable.service(org.apache.avalon.framework.service.ServiceManager)
public void dispose()
dispose
in interface Disposable
dispose
in class URICopletAdapter
Disposable.dispose()
public void streamContent(CopletInstanceData coplet, ContentHandler contentHandler) throws SAXException
AbstractCopletAdapter
streamContent
in class URICopletAdapter
SAXException
AbstractCopletAdapter.streamContent(org.apache.cocoon.portal.coplet.CopletInstanceData, org.xml.sax.ContentHandler)
public void streamContent(CopletInstanceData coplet, String uri, ContentHandler contentHandler) throws SAXException
streamContent
in class URICopletAdapter
SAXException
URICopletAdapter.streamContent(org.apache.cocoon.portal.coplet.CopletInstanceData, java.lang.String, org.xml.sax.ContentHandler)
public void inform(CopletInstanceEvent e, PortalService service)
inform
in class URICopletAdapter
Receiver
public void handleCopletInstanceEvent(CopletInstanceEvent event)
protected boolean isSizingEvent(CopletInstanceEvent event)
protected String getCacheKey(CopletInstanceData coplet, String uri)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |