Class HandlerDefinition

  extended by
      extended by

public final class HandlerDefinition
extends ObjectDefinition

Defines a handler to be invoked during processing, for example for SOAP header handling. Handlers to be used for a service are set using ServiceDefinition.setHandlerDefinitions(java.util.List).

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.

Constructor Summary
Method Summary
 void setHandlerObject(Object obj)
          Sets a handler object.
Methods inherited from class
getObject, init, setArgs, setClassName
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public HandlerDefinition()

Method Detail


public void setHandlerObject(Object obj)
Sets a handler object. If this is set to a non null value, the handler class and args do not need to be set, and will be ignored. If set, the handler object must be thread safe. The specified object must implement either the InHandler or OutHandler interface.

obj - handler object

Project Web Site