org.apache.jcs.auxiliary.remote.server
Class RemoteCacheStartupServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.apache.jcs.auxiliary.remote.server.RemoteCacheStartupServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class RemoteCacheStartupServlet
extends HttpServlet

This servlet can be used to startup the JCS remote cache. It is easy to deploy the remote server in a tomcat base. This give you an easy way to monitor its activity.

JCSRemoteCacheStartupServlet org.apache.jcs.auxiliary.remote.server.RemoteCacheStartupServlet 1 JCSRemoteCacheStartupServlet /jcs

Author:
Aaron Smuts
See Also:
Serialized Form

Constructor Summary
RemoteCacheStartupServlet()
           
 
Method Summary
 void destroy()
          shuts the cache down.
 void init()
          Starts the registry and then tries to bind to it.
protected  void service(HttpServletRequest request, HttpServletResponse response)
          It just dumps the stats.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteCacheStartupServlet

public RemoteCacheStartupServlet()
Method Detail

init

public void init()
          throws ServletException
Starts the registry and then tries to bind to it.

Gets the port from a props file. Uses the local host name for the registry host. Tries to start the registry, ignoring failure. Starts the server.

Overrides:
init in class GenericServlet
Throws:
ServletException

service

protected void service(HttpServletRequest request,
                       HttpServletResponse response)
                throws ServletException,
                       IOException
It just dumps the stats.

Overrides:
service in class HttpServlet
Parameters:
request -
response -
Throws:
ServletException
IOException

destroy

public void destroy()
shuts the cache down.

Specified by:
destroy in interface Servlet
Overrides:
destroy in class GenericServlet


Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.