KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > ws > mbean > Handler


1 /**
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 2005 Bull S.A.
4  * Contact: jonas-team@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA
20  *
21  * --------------------------------------------------------------------------
22  * $Id$
23  * --------------------------------------------------------------------------
24  */

25 package org.objectweb.jonas.ws.mbean;
26
27 import java.util.List JavaDoc;
28 import java.util.Properties JavaDoc;
29
30 /**
31  * A <code>Handler</code> MBean represents a
32  * handler element in webservices.xml
33  *
34  * @author Guillaume Sauthier
35  */

36 public class Handler extends AbstractWebServiceMBean {
37
38     /**
39      * Handler name
40      */

41     private String JavaDoc name = null;
42
43     /**
44      * Handler classname
45      */

46     private String JavaDoc classname = null;
47
48     /**
49      * Properties used to init the handler
50      */

51     private Properties JavaDoc initParams = new Properties JavaDoc();
52
53     /**
54      * list of soap:header the handler will access
55      */

56     private String JavaDoc[] soapHeaders = null;
57
58     /**
59      * list of soap-roles under which the handler acts
60      */

61     private String JavaDoc[] soapRoles = null;
62
63     /**
64      * Handler constructor
65      * @param objectName Handler ObjectName
66      */

67     public Handler(String JavaDoc objectName) {
68         super(objectName);
69     }
70
71     /**
72      * @return Returns the classname.
73      */

74     public String JavaDoc getClassname() {
75         return classname;
76     }
77
78     /**
79      * @param classname The classname to set.
80      */

81     public void setClassname(String JavaDoc classname) {
82         this.classname = classname;
83     }
84
85     /**
86      * @return Returns the name.
87      */

88     public String JavaDoc getName() {
89         return name;
90     }
91
92     /**
93      * @param name The name to set.
94      */

95     public void setName(String JavaDoc name) {
96         this.name = name;
97     }
98
99     /**
100      * @return Returns the initParams.
101      */

102     public Properties JavaDoc getInitParams() {
103         return initParams;
104     }
105
106     /**
107      * @param initParams The initParams to set.
108      */

109     public void setInitParams(Properties JavaDoc initParams) {
110         this.initParams = initParams;
111     }
112
113     /**
114      * @return Returns the soapHeaders.
115      */

116     public String JavaDoc[] getSoapHeaders() {
117         return soapHeaders;
118     }
119
120     /**
121      * @return Returns the soapRoles.
122      */

123     public String JavaDoc[] getSoapRoles() {
124         return soapRoles;
125     }
126
127     /**
128      * @param soapHeaders The soapHeaders to set.
129      */

130     public void setSoapHeaders(String JavaDoc[] soapHeaders) {
131         this.soapHeaders = soapHeaders;
132     }
133
134     /**
135      * @param soapRoles The soapRoles to set.
136      */

137     public void setSoapRoles(String JavaDoc[] soapRoles) {
138         this.soapRoles = soapRoles;
139     }
140
141     /**
142      * @return Returns the Handler MBean subtype
143      */

144     protected String JavaDoc getMBeanType() {
145         return WebServicesObjectName.HANDLER_TYPE;
146     }
147
148     /**
149      * @return Returns the childs MBeans (if any)
150      */

151     protected List JavaDoc getChildsMBeans() {
152         // Handlers are in the bottom of the Chain, no childs
153
return null;
154     }
155
156 }
157
Popular Tags