javax.xml.rpc.handler
Interface Handler

All Known Subinterfaces:
HandlerChain

public interface Handler

A handler provides a mechanism for processing of service context, plugging in additional RPC processing behavior and enhancing functionality of a JAX-RPC runtime system.

A JAX-RPC handler is required to implement the javax.xml.rpc.handler.Handler interface.


Method Summary
 void destroy()
          The destroy method indicates the end of lifecycle for a Handler instance.
 void handle(MessageContext context)
          The handle method performs the actual processing work for a handler.
 void init(java.util.Map config)
          The init method to enable the Handler instance to initialize itself.
 

Method Detail

handle

public void handle(MessageContext context)
            throws JAXRPCException,
                   SOAPFault
The handle method performs the actual processing work for a handler. An implementation class for the Handler interface is required to provide a default constructor.
Parameters:
context - MessageContext parameter provides access to the message context (for example: SOAP message that carries an RPC request) that is processed by a handler.
Throws:
JAXRPCException - if any handler specific processing error happens
SOAPFault - if SOAP fault is generated by this handler

init

public void init(java.util.Map config)
          throws JAXRPCException
The init method to enable the Handler instance to initialize itself. The init method passes the handler configuration properties as a Map instance. These configuration properties are used to configure the Handler (for example: setup access to an external resource or service) during initialization.
Parameters:
config - Configuration parameters for initialization of handler
Throws:
JAXRPCException - If initialization of the handler fails

destroy

public void destroy()
             throws JAXRPCException
The destroy method indicates the end of lifecycle for a Handler instance. An Handler implementation class should release any resources that it had acquired over its lifecycle. The JAX-RPC runtime system invokes the destroy method, when the Handler instance is no longer needed.
Throws:
JAXRPCException - If any error during destroy


Copyright © 2001 Apache XML Project. All Rights Reserved.