KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > axis2 > phaserule > PhaseRuleHandlers


1 package org.apache.axis2.phaserule;
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.axis2.handlers.AbstractHandler;
7 import org.apache.commons.logging.Log;
8 import org.apache.commons.logging.LogFactory;
9
10 import javax.xml.namespace.QName JavaDoc;
11
12 /*
13  * Copyright 2004,2005 The Apache Software Foundation.
14  *
15  * Licensed under the Apache License, Version 2.0 (the "License");
16  * you may not use this file except in compliance with the License.
17  * You may obtain a copy of the License at
18  *
19  * http://www.apache.org/licenses/LICENSE-2.0
20  *
21  * Unless required by applicable law or agreed to in writing, software
22  * distributed under the License is distributed on an "AS IS" BASIS,
23  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24  * See the License for the specific language governing permissions and
25  * limitations under the License.
26  *
27  *
28  */

29
30 /**
31  * Author : Deepal Jayasinghe
32  * Date: May 20, 2005
33  * Time: 11:46:55 AM
34  */

35 public class PhaseRuleHandlers extends AbstractHandler implements Handler {
36
37     private Log log = LogFactory.getLog(getClass());
38     private String JavaDoc message;
39     private QName JavaDoc name;
40
41     public PhaseRuleHandlers() {
42         this.message = "inside service 2";
43     }
44
45     public QName JavaDoc getName() {
46         return name;
47     }
48
49     public void invoke(MessageContext msgContext) throws AxisFault {
50         System.out.println("I am " + name + " Handler Running :)");
51         log.info("I am " + name + " Handler Running :)");
52     }
53
54     public void revoke(MessageContext msgContext) {
55         log.info("I am " + name + " Handler Running :)");
56     }
57
58     public void setName(QName JavaDoc name) {
59         this.name = name;
60     }
61 }
62
Popular Tags