|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.apache.jcs.auxiliary.remote.http.server.RemoteHttpCacheServlet
public class RemoteHttpCacheServlet
This servlet simply reads and writes objects. The requests are packaged in a general wrapper. The processor works on the wrapper object and returns a response wrapper.
Constructor Summary | |
---|---|
RemoteHttpCacheServlet()
|
Method Summary | |
---|---|
void |
destroy()
Release the cache manager. |
protected void |
ensureCacheManager()
Make sure we have a cache manager. |
RemoteCacheServiceAdaptor |
getRemoteHttpCacheServiceAdaptor()
|
java.lang.String |
getServletInfo()
Get servlet information |
void |
init(javax.servlet.ServletConfig config)
Initializes the cache. |
protected RemoteCacheRequest |
readRequest(javax.servlet.http.HttpServletRequest request)
Read the request from the input stream. |
protected RemoteCacheRequest |
readRequestFromStream(java.io.InputStream inputStream)
Reads the response from the stream and then closes it. |
void |
service(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Read the request, call the processor, write the response. |
void |
setRemoteHttpCacheServiceAdaptor(RemoteCacheServiceAdaptor remoteHttpCacheProcessor)
|
protected void |
writeResponse(javax.servlet.http.HttpServletResponse response,
RemoteCacheResponse cacheResponse)
Write the response to the output stream. |
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, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RemoteHttpCacheServlet()
Method Detail |
---|
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
This provides an easy extension point. Simply extend this servlet and override the init method to change the way the properties are loaded.
init
in interface javax.servlet.Servlet
init
in class javax.servlet.GenericServlet
config
-
javax.servlet.ServletException
public void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
service
in class javax.servlet.http.HttpServlet
request
- response
-
javax.servlet.ServletException
java.io.IOException
protected RemoteCacheRequest readRequest(javax.servlet.http.HttpServletRequest request)
request
-
protected RemoteCacheRequest readRequestFromStream(java.io.InputStream inputStream) throws java.io.IOException, java.lang.ClassNotFoundException
inputStream
-
java.io.IOException
java.lang.ClassNotFoundException
protected void writeResponse(javax.servlet.http.HttpServletResponse response, RemoteCacheResponse cacheResponse)
response
- cacheResponse
- protected void ensureCacheManager()
public void destroy()
destroy
in interface javax.servlet.Servlet
destroy
in class javax.servlet.GenericServlet
public java.lang.String getServletInfo()
getServletInfo
in interface javax.servlet.Servlet
getServletInfo
in class javax.servlet.GenericServlet
public void setRemoteHttpCacheServiceAdaptor(RemoteCacheServiceAdaptor remoteHttpCacheProcessor)
remoteHttpCacheProcessor
- the remoteHttpCacheProcessor to setpublic RemoteCacheServiceAdaptor getRemoteHttpCacheServiceAdaptor()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |