KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > Handler2


1 import javax.xml.namespace.QName JavaDoc;
2
3 import org.apache.axis2.context.MessageContext;
4 import org.apache.axis2.engine.AxisFault;
5 import org.apache.axis2.engine.Handler;
6 import org.apache.commons.logging.Log;
7 import org.apache.commons.logging.LogFactory;
8 import org.apache.axis2.handlers.AbstractHandler;
9
10 public class Handler2 extends AbstractHandler implements Handler {
11     private Log log = LogFactory.getLog(getClass());
12     private String JavaDoc message;
13     private QName JavaDoc name;
14     public Handler2() {
15        this.message = "inside service 2";
16     }
17     public QName JavaDoc getName() {
18         return name;
19     }
20
21     public void invoke(MessageContext msgContext) throws AxisFault {
22         log.info("I am " + message + " Handler Running :)");
23     }
24
25     public void revoke(MessageContext msgContext) {
26         log.info("I am " + message + " Handler Running :)");
27     }
28
29     public void setName(QName JavaDoc name) {
30         this.name = name;
31     }
32
33 }
34
Popular Tags