Oracle Application Server Containers for J2EE Support for JavaServer Pages API Reference
10g Release 2 (10.1.2)

B14015-02


oracle.jsp.jwcache
Class CacheClientUtil

java.lang.Object
  extended byoracle.jsp.jwcache.CacheClientUtil


public class CacheClientUtil
extends java.lang.Object

A utility library class that contains static methods to ease up user's burden.


Constructor Summary
CacheClientUtil()

Method Summary
static CachePolicy lookupPolicy(javax.servlet.ServletConfig config, javax.servlet.http.HttpServletRequest request, java.lang.String policyFile)
A method to lookup and construct a cache policy object from a cache policy file
static CachePolicy refreshPolicy(javax.servlet.ServletConfig config, javax.servlet.http.HttpServletRequest request, java.lang.String policyFile)
A method to reload, re-parse and re-construct a cache policy object from a cache policy file

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

CacheClientUtil

public CacheClientUtil()

Method Detail

lookupPolicy

public static CachePolicy lookupPolicy(javax.servlet.ServletConfig config,
                                       javax.servlet.http.HttpServletRequest request,
                                       java.lang.String policyFile)
                                throws CachePolicyLoadingException
A method to lookup and construct a cache policy object from a cache policy file

If the cache policy is already loaded previously either in ocs4j or your own servlet context (depends on your cache_policy_in_ocs configuration), then it will just reuse the existing cache policy object in memory, instead of reloading and re-parsing the cache policy file. The first loading will store the cache policy object in memory for later reuse.

Parameters:
config - user's current ServletConfig object
request - user's current HttpServletRequest object
policyFile - a string that specifies the URI to the cache policy file; the URI path is relative to your servlet context;
Returns:
the loaded cache policy object
Throws:
CachePolicyLoadingException

refreshPolicy

public static CachePolicy refreshPolicy(javax.servlet.ServletConfig config,
                                        javax.servlet.http.HttpServletRequest request,
                                        java.lang.String policyFile)
                                 throws CachePolicyLoadingException
A method to reload, re-parse and re-construct a cache policy object from a cache policy file

No matter whether the cache policy is already loaded previously. This method will always reload, re-parse and re-construct the cache policy object from the cache policy file. After reloading, this method will store the cache policy object in memory for later reuse.

Parameters:
config - user's current ServletConfig object
request - user's current HttpServletRequest object
policyFile - a string that specifies the URI to the cache policy file; the URI path is relative to your servlet context;
Returns:
the loaded cache policy object
Throws:
CachePolicyLoadingException

Oracle Application Server Containers for J2EE Support for JavaServer Pages API Reference
10g Release 2 (10.1.2)

B14015-02


Copyright © 2004, 2005, Oracle. All rights reserved.