|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface HandlerAdapter
Portlet MVC framework SPI interface, allowing parameterization of core MVC workflow.
Interface that must be implemented for each handler type to handle a request. This interface is used to allow the DispatcherPortlet to be indefinitely extensible. The DispatcherPortlet accesses all installed handlers through this interface, meaning that it does not contain code specific to any handler type.
Note that a handler can be of type Object. This is to enable handlers from other frameworks to be integrated with this framework without custom coding.
This interface is not intended for application developers. It is available to handlers who want to develop their own web workflow.
Note: Implementations can implement the Ordered interface to be able to specify a sorting order and thus a priority for getting applied by DispatcherPortlet. Non-Ordered instances get treated as lowest priority.
SimpleControllerHandlerAdapter
Method Summary | |
---|---|
void |
handleAction(javax.portlet.ActionRequest request,
javax.portlet.ActionResponse response,
Object handler)
Use the given handler to handle this action request. |
void |
handleEvent(javax.portlet.EventRequest request,
javax.portlet.EventResponse response,
Object handler)
Use the given handler to handle this event request. |
ModelAndView |
handleRender(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response,
Object handler)
Use the given handler to handle this render request. |
ModelAndView |
handleResource(javax.portlet.ResourceRequest request,
javax.portlet.ResourceResponse response,
Object handler)
Use the given handler to handle this resource request. |
boolean |
supports(Object handler)
Given a handler instance, return whether or not this HandlerAdapter can support it. |
Method Detail |
---|
boolean supports(Object handler)
A typical implementation:
return (handler instanceof MyHandler);
handler
- handler object to check
void handleAction(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response, Object handler) throws Exception
request
- current action requestresponse
- current action responsehandler
- handler to use. This object must have previously been passed
to the supports
method of this interface, which must have
returned true.
Exception
- in case of errorsPortlet.processAction(javax.portlet.ActionRequest, javax.portlet.ActionResponse)
ModelAndView handleRender(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response, Object handler) throws Exception
request
- current render requestresponse
- current render responsehandler
- handler to use. This object must have previously been passed
to the supports
method of this interface, which must have
returned true
.
null
if the request has been handled directly
Exception
- in case of errorsPortlet.render(javax.portlet.RenderRequest, javax.portlet.RenderResponse)
ModelAndView handleResource(javax.portlet.ResourceRequest request, javax.portlet.ResourceResponse response, Object handler) throws Exception
request
- current render requestresponse
- current render responsehandler
- handler to use. This object must have previously been passed
to the supports
method of this interface, which must have
returned true
.
null
if the request has been handled directly
Exception
- in case of errorsResourceServingPortlet.serveResource(javax.portlet.ResourceRequest, javax.portlet.ResourceResponse)
void handleEvent(javax.portlet.EventRequest request, javax.portlet.EventResponse response, Object handler) throws Exception
request
- current action requestresponse
- current action responsehandler
- handler to use. This object must have previously been passed
to the supports
method of this interface, which must have
returned true.
Exception
- in case of errorsEventPortlet.processEvent(javax.portlet.EventRequest, javax.portlet.EventResponse)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |