ro.isdc.wro.http.handler
Class ReloadCacheRequestHandler

java.lang.Object
  extended by ro.isdc.wro.http.handler.RequestHandlerSupport
      extended by ro.isdc.wro.http.handler.ReloadCacheRequestHandler
All Implemented Interfaces:
RequestHandler

public class ReloadCacheRequestHandler
extends RequestHandlerSupport

This RequestHandler will reload the cache on HTTP requests to "wroAPI/reloadCache".

This handler is available only in debug mode by default. You can change this behavior by overriding RequestHandler.isEnabled() method.

Since:
1.4.7
Author:
Ivar Conradi Ă˜sthus

Field Summary
static String ALIAS
          The alias of this RequestHandler used for configuration.
static String ENDPOINT_URI
          API - reload cache method call
 
Fields inherited from class ro.isdc.wro.http.handler.RequestHandlerSupport
PATH_API
 
Constructor Summary
ReloadCacheRequestHandler()
           
 
Method Summary
 boolean accept(javax.servlet.http.HttpServletRequest request)
          Determines if current request can be handled by this requestHandler
 void handle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handle the given request, generating a response.
 boolean isEnabled()
          Used to determine if the RequestHandler is enabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALIAS

public static final String ALIAS
The alias of this RequestHandler used for configuration.

See Also:
Constant Field Values

ENDPOINT_URI

public static final String ENDPOINT_URI
API - reload cache method call

See Also:
Constant Field Values
Constructor Detail

ReloadCacheRequestHandler

public ReloadCacheRequestHandler()
Method Detail

handle

public void handle(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
            throws IOException
Handle the given request, generating a response.

Specified by:
handle in interface RequestHandler
Overrides:
handle in class RequestHandlerSupport
Parameters:
request - current HTTP request
response - current HTTP response
Throws:
IOException - in case of I/O errors

accept

public boolean accept(javax.servlet.http.HttpServletRequest request)
Determines if current request can be handled by this requestHandler

Specified by:
accept in interface RequestHandler
Overrides:
accept in class RequestHandlerSupport
Parameters:
request - current HTTP request
Returns:
true if this requestHandler should handle this request

isEnabled

public boolean isEnabled()
Used to determine if the RequestHandler is enabled

Specified by:
isEnabled in interface RequestHandler
Overrides:
isEnabled in class RequestHandlerSupport


Copyright © 2008-2013. All Rights Reserved.