|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.context.support.ApplicationObjectSupport org.springframework.web.context.support.WebApplicationObjectSupport org.springframework.web.servlet.support.WebContentGenerator org.springframework.web.servlet.mvc.AbstractController org.springframework.web.servlet.mvc.BaseCommandController org.springframework.web.servlet.mvc.AbstractCommandController magoffin.matt.ma2.web.AbstractCommandController magoffin.matt.ma2.web.ShadowServerController
public class ShadowServerController
Controller for serving up media item shadows.
Nested Class Summary | |
---|---|
static class |
ShadowServerController.Command
Command class for shadow server. |
Field Summary | |
---|---|
static java.lang.String |
OUTPUT_MIME
The MIME type of the generated image. |
Fields inherited from class magoffin.matt.ma2.web.AbstractCommandController |
---|
HTTP_USER_AGENT_HEADER |
Fields inherited from class org.springframework.web.servlet.mvc.BaseCommandController |
---|
DEFAULT_COMMAND_NAME |
Fields inherited from class org.springframework.web.servlet.support.WebContentGenerator |
---|
HEADER_CACHE_CONTROL, HEADER_EXPIRES, HEADER_PRAGMA, METHOD_GET, METHOD_HEAD, METHOD_POST |
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport |
---|
logger |
Constructor Summary | |
---|---|
ShadowServerController()
|
Method Summary | |
---|---|
protected void |
generateShadow(ShadowServerController.Command cmd,
java.io.OutputStream out)
Generate the shadow and send to the output stream. |
protected java.lang.String |
getCacheKey(ShadowServerController.Command cmd)
Generate a cache key for the given command. |
long |
getLastModified(javax.servlet.http.HttpServletRequest request)
|
net.sf.ehcache.Cache |
getShadowCache()
|
protected org.springframework.web.servlet.ModelAndView |
handle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.Object command,
org.springframework.validation.BindException errors)
|
void |
setShadowCache(net.sf.ehcache.Cache shadowCache)
|
Methods inherited from class magoffin.matt.ma2.web.AbstractCommandController |
---|
getDomainObjectFactory, getErrorView, getMessagesSource, getSuccessView, getSystemBiz, getWebHelper, initApplicationContext, registerCalendarEditor, setDomainObjectFactory, setErrorView, setMessagesSource, setSuccessView, setSystemBiz, setWebHelper |
Methods inherited from class org.springframework.web.servlet.mvc.AbstractCommandController |
---|
handleRequestInternal |
Methods inherited from class org.springframework.web.servlet.mvc.BaseCommandController |
---|
bindAndValidate, checkCommand, createBinder, createCommand, getBindingErrorProcessor, getCommand, getCommandClass, getCommandName, getMessageCodesResolver, getPropertyEditorRegistrars, getValidator, getValidators, initBinder, isValidateOnBinding, onBind, onBind, onBindAndValidate, setBindingErrorProcessor, setCommandClass, setCommandName, setMessageCodesResolver, setPropertyEditorRegistrar, setPropertyEditorRegistrars, setValidateOnBinding, setValidator, setValidators, suppressBinding, suppressValidation |
Methods inherited from class org.springframework.web.servlet.mvc.AbstractController |
---|
handleRequest, isSynchronizeOnSession, setSynchronizeOnSession |
Methods inherited from class org.springframework.web.servlet.support.WebContentGenerator |
---|
applyCacheSeconds, applyCacheSeconds, cacheForSeconds, cacheForSeconds, checkAndPrepare, checkAndPrepare, getCacheSeconds, getSupportedMethods, isRequireSession, isUseCacheControlHeader, isUseExpiresHeader, preventCaching, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseExpiresHeader |
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport |
---|
getServletContext, getTempDir, getWebApplicationContext, isContextRequired |
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport |
---|
getApplicationContext, getMessageSourceAccessor, requiredContextClass, setApplicationContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String OUTPUT_MIME
Constructor Detail |
---|
public ShadowServerController()
Method Detail |
---|
protected org.springframework.web.servlet.ModelAndView handle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.Object command, org.springframework.validation.BindException errors) throws java.lang.Exception
handle
in class org.springframework.web.servlet.mvc.AbstractCommandController
java.lang.Exception
protected java.lang.String getCacheKey(ShadowServerController.Command cmd)
cmd
- the command
public long getLastModified(javax.servlet.http.HttpServletRequest request)
getLastModified
in interface org.springframework.web.servlet.mvc.LastModified
protected void generateShadow(ShadowServerController.Command cmd, java.io.OutputStream out) throws java.io.IOException
Other classes might want to override this method to generate the shadow in a different way.
cmd
- the commandout
- the output stream
java.io.IOException
- if an IO error occurspublic net.sf.ehcache.Cache getShadowCache()
public void setShadowCache(net.sf.ehcache.Cache shadowCache)
shadowCache
- The shadowCache to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |