Package org.apache.ofbiz.webapp.event
Interface EventHandler
- All Known Implementing Classes:
GroovyEventHandler
,JavaEventHandler
,RomeEventHandler
,ScriptEventHandler
,ServiceEventHandler
,ServiceMultiEventHandler
,SimpleEventHandler
,SOAPEventHandler
public interface EventHandler
EventHandler - Event Handler Interface
-
Method Summary
Modifier and TypeMethodDescriptionvoid
init
(ServletContext context) Initializes the handler.invoke
(ConfigXMLReader.Event event, ConfigXMLReader.RequestMap requestMap, HttpServletRequest request, HttpServletResponse response) Invoke the web event
-
Method Details
-
init
Initializes the handler. Since handlers use the singleton pattern this method should only be called the first time the handler is used.- Parameters:
context
- ServletContext This may be needed by the handler in order to lookup properties or XML definition files for rendering pages or handler options.- Throws:
EventHandlerException
-
invoke
String invoke(ConfigXMLReader.Event event, ConfigXMLReader.RequestMap requestMap, HttpServletRequest request, HttpServletResponse response) throws EventHandlerException Invoke the web event- Parameters:
event
- Contains information about what to executerequestMap
- Contains information about the request-map the event was called fromrequest
- The servlet request objectresponse
- The servlet response object- Returns:
- String Result code
- Throws:
EventHandlerException
-