ro.isdc.wro.http.handler
Interface RequestHandler

All Known Implementing Classes:
LazyRequestHandlerDecorator, ModelAsJsonRequestHandler, ReloadCacheRequestHandler, ReloadModelRequestHandler, RequestHandlerSupport, ResourceProxyRequestHandler

public interface RequestHandler

Handler interface for components that process HTTP request. Typically implemented to provide api functionality for the WroFilter. Handlers are applied before the processing in the WroFilter, and only one handler can be applied. If one handler is applied, other handlers are skipped and processing is not performed.

It is recommended to accept requests for the uri's containing the following path: RequestHandlerSupport.PATH_API.

Since:
1.4.7
Author:
Ivar Conradi Ă˜sthus

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
 

Method Detail

handle

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

Parameters:
request - current HTTP request
response - current HTTP response
Throws:
IOException - in case of I/O errors

accept

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

Parameters:
request - current HTTP request
Returns:
true if this requestHandler should handle this request

isEnabled

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



Copyright © 2008-2013. All Rights Reserved.