org.openmobileis.services.cache
Class WebPageCacheManager

java.lang.Object
  extended byorg.openmobileis.services.cache.WebPageCacheManager

public final class WebPageCacheManager
extends java.lang.Object

Title: OpenMobileIS project source
Description: Main manage to register a service that has its page cached. The use of web page cache for service that use complet processis to generate an answer with data that doen't change often. When a request arrive for this service, if it has already been cached, the cached page is return with no service processing. To register a service, you must use a WebPageCacheServiceStruct. A default implementation is provided. This structure define cache properties and store cached page. When registering a service register for a spcific event that will signal when the cache has to be cleared. A service can register the same WebPageCacheServiceStruct for several event. When an event is send, all cached page of all service registered for this event is validated with the WebPageCacheServiceStruct implementation.

Since:
JDK 1.1
Version:
1.0.
Author:
Philippe Delrieu

Method Summary
 byte[] getCachedPage(HttpServletRequest req, Service service)
           
static WebPageCacheManager getManager()
           
 void registerService(WebPageCacheServiceStruct service, WebPageCacheEvent event)
           
 void sendCacheEvent(WebPageCacheEvent event)
           
 void setCachedPage(HttpServletRequest req, byte[] cachedData, Service service)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getManager

public static WebPageCacheManager getManager()

registerService

public void registerService(WebPageCacheServiceStruct service,
                            WebPageCacheEvent event)

getCachedPage

public byte[] getCachedPage(HttpServletRequest req,
                            Service service)

setCachedPage

public void setCachedPage(HttpServletRequest req,
                          byte[] cachedData,
                          Service service)

sendCacheEvent

public void sendCacheEvent(WebPageCacheEvent event)


Copyright 2005 e-Care. All Rights Reserved.