org.jibx.ws.server
Class HandlerDefinition
java.lang.Object
org.jibx.ws.server.ObjectDefinition
org.jibx.ws.server.HandlerDefinition
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.
HandlerDefinition
public HandlerDefinition()
- Constructor.
setHandlerObject
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.
- Parameters:
obj
- handler object