1 16 package org.apache.axis2.handlers; 17 18 import org.apache.axis2.context.MessageContext; 19 import org.apache.axis2.description.HandlerDescription; 20 import org.apache.axis2.description.Parameter; 21 import org.apache.axis2.engine.AxisFault; 22 import org.apache.axis2.engine.Handler; 23 24 import javax.xml.namespace.QName ; 25 26 29 public abstract class AbstractHandler implements Handler { 30 31 34 private static HandlerDescription EMPTY_HANDLER_METADATA = 35 new HandlerDescription(new QName ("deafult Handler")); 36 37 40 protected HandlerDescription handlerDesc; 41 42 45 public AbstractHandler() { 46 handlerDesc = EMPTY_HANDLER_METADATA; 47 } 48 49 54 public QName getName() { 55 return handlerDesc.getName(); 56 } 57 58 63 public void revoke(MessageContext msgContext) { 64 } 65 66 71 public void cleanup() throws AxisFault { 72 } 73 74 80 public Parameter getParameter(String name) { 81 return handlerDesc.getParameter(name); 82 } 83 84 89 public void init(HandlerDescription handlerdesc) { 90 this.handlerDesc = handlerdesc; 91 } 92 93 99 public HandlerDescription getHandlerDesc() { 100 return handlerDesc; 101 } 102 105 public String toString() { 106 QName name = this.getName(); 107 return (name!=null)?name.toString():null; 108 } 109 110 } 111 | Popular Tags |