com.bea.p13n.cache.servlets
Class CacheManagerServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.bea.p13n.cache.servlets.CacheManagerServlet
All Implemented Interfaces
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class CacheManagerServlet
extends javax.servlet.http.HttpServlet

A servlet which can interact with the p13n caches.

This can only modify cache instances at runtime; to modify cache deployment descriptor beans, you need to use the descriptor bean framework (or the admin portal).

This obeys the 'opeartion' query parameter:

The output will be text/xml, like:
 <caches>
   <cache>
     <name>...</name>
     <enabled>...</enabled>
     <max-entries>...</max-entries>
     <size>...</size>
     <ttl>...</ttl>
     <description>...</description>
     <configured>...</configured>
     <hit-rate>...</hit-rate>
     <hit-count>...</hit-count>
     <miss-count>...</miss-count>
   </cache>
 </caches>
 
with the contents depending upon the operation. 'flush' will only return <cache><name>...</name></cache> blocks for each cache flushed. 'set' will return a complete <cache></cache> block with the new values for the cache (can be used to determine if one didn't get set); if there isn't a corresponding CacheMBean for the cache, then <description> wont' be sent back. 'get' will return <cache></cache> for each cache in the system.

See Also
Serialized Form

Constructor Summary
CacheManagerServlet()
           
 
Method Summary
 void doCacheFlush(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
 void doCacheGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
 void doCacheSet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
 void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
 void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
static String xmlize(String in)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheManagerServlet

public CacheManagerServlet()
Method Detail

doGet

public void doGet(javax.servlet.http.HttpServletRequest req,
                  javax.servlet.http.HttpServletResponse resp)
           throws IOException
Overrides:
doGet in class javax.servlet.http.HttpServlet
Throws
IOException

doPost

public void doPost(javax.servlet.http.HttpServletRequest req,
                   javax.servlet.http.HttpServletResponse resp)
            throws IOException
Overrides:
doPost in class javax.servlet.http.HttpServlet
Throws
IOException

doCacheSet

public void doCacheSet(javax.servlet.http.HttpServletRequest req,
                       javax.servlet.http.HttpServletResponse resp)
                throws IOException
Throws
IOException

doCacheFlush

public void doCacheFlush(javax.servlet.http.HttpServletRequest req,
                         javax.servlet.http.HttpServletResponse resp)
                  throws IOException
Throws
IOException

doCacheGet

public void doCacheGet(javax.servlet.http.HttpServletRequest req,
                       javax.servlet.http.HttpServletResponse resp)
                throws IOException
Throws
IOException

xmlize

public static final String xmlize(String in)


Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.