001: /**
002: * JOnAS: Java(TM) Open Application Server
003: * Copyright (C) 2005 Bull S.A.
004: * Contact: jonas-team@objectweb.org
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation; either
009: * version 2.1 of the License, or any later version.
010: *
011: * This library is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: *
016: * You should have received a copy of the GNU Lesser General Public
017: * License along with this library; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
019: * USA
020: *
021: * --------------------------------------------------------------------------
022: * $Id$
023: * --------------------------------------------------------------------------
024: */package org.objectweb.jonas.ws.mbean;
025:
026: import java.util.List;
027: import java.util.Properties;
028:
029: /**
030: * A <code>Handler</code> MBean represents a
031: * handler element in webservices.xml
032: *
033: * @author Guillaume Sauthier
034: */
035: public class Handler extends AbstractWebServiceMBean {
036:
037: /**
038: * Handler name
039: */
040: private String name = null;
041:
042: /**
043: * Handler classname
044: */
045: private String classname = null;
046:
047: /**
048: * Properties used to init the handler
049: */
050: private Properties initParams = new Properties();
051:
052: /**
053: * list of soap:header the handler will access
054: */
055: private String[] soapHeaders = null;
056:
057: /**
058: * list of soap-roles under which the handler acts
059: */
060: private String[] soapRoles = null;
061:
062: /**
063: * Handler constructor
064: * @param objectName Handler ObjectName
065: */
066: public Handler(String objectName) {
067: super (objectName);
068: }
069:
070: /**
071: * @return Returns the classname.
072: */
073: public String getClassname() {
074: return classname;
075: }
076:
077: /**
078: * @param classname The classname to set.
079: */
080: public void setClassname(String classname) {
081: this .classname = classname;
082: }
083:
084: /**
085: * @return Returns the name.
086: */
087: public String getName() {
088: return name;
089: }
090:
091: /**
092: * @param name The name to set.
093: */
094: public void setName(String name) {
095: this .name = name;
096: }
097:
098: /**
099: * @return Returns the initParams.
100: */
101: public Properties getInitParams() {
102: return initParams;
103: }
104:
105: /**
106: * @param initParams The initParams to set.
107: */
108: public void setInitParams(Properties initParams) {
109: this .initParams = initParams;
110: }
111:
112: /**
113: * @return Returns the soapHeaders.
114: */
115: public String[] getSoapHeaders() {
116: return soapHeaders;
117: }
118:
119: /**
120: * @return Returns the soapRoles.
121: */
122: public String[] getSoapRoles() {
123: return soapRoles;
124: }
125:
126: /**
127: * @param soapHeaders The soapHeaders to set.
128: */
129: public void setSoapHeaders(String[] soapHeaders) {
130: this .soapHeaders = soapHeaders;
131: }
132:
133: /**
134: * @param soapRoles The soapRoles to set.
135: */
136: public void setSoapRoles(String[] soapRoles) {
137: this .soapRoles = soapRoles;
138: }
139:
140: /**
141: * @return Returns the Handler MBean subtype
142: */
143: protected String getMBeanType() {
144: return WebServicesObjectName.HANDLER_TYPE;
145: }
146:
147: /**
148: * @return Returns the childs MBeans (if any)
149: */
150: protected List getChildsMBeans() {
151: // Handlers are in the bottom of the Chain, no childs
152: return null;
153: }
154:
155: }
|