public class RemoteHttpCacheServlet
extends javax.servlet.http.HttpServlet
| Constructor and Description |
|---|
RemoteHttpCacheServlet() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, servicepublic 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.Servletinit in class javax.servlet.GenericServletconfig - javax.servlet.ServletExceptionpublic 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.HttpServletrequest - response - javax.servlet.ServletExceptionjava.io.IOExceptionprotected 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.IOExceptionjava.lang.ClassNotFoundExceptionprotected void writeResponse(javax.servlet.http.HttpServletResponse response,
RemoteCacheResponse cacheResponse)
response - cacheResponse - protected void ensureCacheManager()
public void destroy()
destroy in interface javax.servlet.Servletdestroy in class javax.servlet.GenericServletpublic java.lang.String getServletInfo()
getServletInfo in interface javax.servlet.ServletgetServletInfo in class javax.servlet.GenericServletpublic void setRemoteHttpCacheServiceAdaptor(RemoteCacheServiceAdaptor remoteHttpCacheProcessor)
remoteHttpCacheProcessor - the remoteHttpCacheProcessor to setpublic RemoteCacheServiceAdaptor getRemoteHttpCacheServiceAdaptor()
Copyright © 2002-2013 Apache Software Foundation. All Rights Reserved.