1 16 package org.apache.axis.handlers; 17 18 import org.apache.axis.AxisFault; 19 import org.apache.axis.MessageContext; 20 import org.apache.axis.components.logger.LogFactory; 21 import org.apache.commons.logging.Log; 22 23 import java.util.Map ; 24 25 30 public class JAXRPCHandler extends BasicHandler { 31 protected static Log log = 32 LogFactory.getLog(JAXRPCHandler.class.getName()); 33 34 protected HandlerChainImpl impl = new HandlerChainImpl(); 35 36 public void init() { 37 super.init(); 38 String className = (String )getOption("className"); 39 if (className != null) { 40 addNewHandler(className, getOptions()); 41 } 42 } 43 44 public void addNewHandler(String className, Map options) { 45 impl.addNewHandler(className, options); 46 } 47 48 public void invoke(MessageContext msgContext) throws AxisFault { 49 log.debug("Enter: JAXRPCHandler::enter invoke"); 50 if (!msgContext.getPastPivot()) { 51 impl.handleRequest(msgContext); 52 } else { 53 impl.handleResponse(msgContext); 54 } 55 log.debug("Enter: JAXRPCHandler::exit invoke"); 56 } 57 58 public void onFault(MessageContext msgContext) { 59 impl.handleFault(msgContext); 60 } 61 62 public void cleanup() { 63 impl.destroy(); 64 } 65 } 66 | Popular Tags |