Class RemoteCacheStartupServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.apache.commons.jcs3.auxiliary.remote.server.RemoteCacheStartupServlet
- All Implemented Interfaces:
Serializable
,Servlet
,ServletConfig
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.
servlet>
<servlet-name>JCSRemoteCacheStartupServlet</servlet-name>
<servlet-class>
org.apache.commons.jcs3.auxiliary.remote.server.RemoteCacheStartupServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>JCSRemoteCacheStartupServlet</servlet-name>
<url-pattern>/jcs</url-pattern>
</servlet-mapping>
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
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
-
Constructor Details
-
RemoteCacheStartupServlet
public RemoteCacheStartupServlet()
-
-
Method Details
-
init
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 classGenericServlet
- Throws:
ServletException
-
service
protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException It just dumps the stats.- Overrides:
service
in classHttpServlet
- Parameters:
request
-response
-- Throws:
ServletException
IOException
-
destroy
shuts the cache down.- Specified by:
destroy
in interfaceServlet
- Overrides:
destroy
in classGenericServlet
-