A HandlerDefinition defines a "handler" that may be invoked in the process of executing an event. A HandlerDefinition has an id, java method, input definitions, output definitions, and child handlers.
The java method to be invoked must have the following method signature:
public void beginDisplay(HandlerContext handlerCtx)
void
above can return a value. Depending on the type of event, return values may be handled differently.
When using JiBX to configure the service, this is populated from the XML service definition document by JiBX unmarshalling. A new instance of the specified handler class will be constructed with the specified arguments for each service instance. Since a separate handler class instance is created for each context these do not need to be threadsafe - only one thread will call any given handler instance at a time.
If not using JiBX to configure the service, a handler object can be specified in place of specifying the handler class and arguments. Since only a single instance of this handler object will be used, the object must be thread-safe. @author Nigel Charman
|
|
|
|