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:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class RemoteCacheStartupServlet
extends javax.servlet.http.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(javax.servlet.http.HttpServletRequest request, javax.servlet.http.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 javax.servlet.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 javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException

service

protected void service(javax.servlet.http.HttpServletRequest request,
                       javax.servlet.http.HttpServletResponse response)
                throws javax.servlet.ServletException,
                       java.io.IOException
It just dumps the stats.

Overrides:
service in class javax.servlet.http.HttpServlet
Parameters:
request -
response -
Throws:
javax.servlet.ServletException
java.io.IOException

destroy

public void destroy()
shuts the cache down.

Specified by:
destroy in interface javax.servlet.Servlet
Overrides:
destroy in class javax.servlet.GenericServlet


Copyright © 2002-2011 Apache Software Foundation. All Rights Reserved.