1 16 package org.apache.axis.ime.internal.util.handler; 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.axis.handlers.BasicHandler; 22 import org.apache.axis.ime.MessageExchange; 23 import org.apache.commons.logging.Log; 24 25 31 public class MessageExchangeHandler 32 extends BasicHandler { 33 34 protected static Log log = 35 LogFactory.getLog(MessageExchangeHandler.class.getName()); 36 37 private MessageExchange messageExchange; 38 39 public MessageExchangeHandler() {} 40 41 public MessageExchangeHandler(MessageExchange exchange) { 42 this.messageExchange = exchange; 43 } 44 45 public void invoke( 46 MessageContext msgContext) 47 throws AxisFault { 48 if (log.isDebugEnabled()) { 49 log.debug("Enter: MessageExchangeHandler::invoke"); 50 } 51 msgContext = messageExchange.sendAndReceive(msgContext); 52 if (log.isDebugEnabled()) { 53 log.debug("Exit: MessageExchangeHandler::invoke"); 54 } 55 } 56 57 public MessageExchange getMessageExchange() { 58 return this.messageExchange; 59 } 60 61 public void setMessageExchange(MessageExchange exchange) { 62 this.messageExchange = exchange; 63 } 64 } 65 | Popular Tags |