KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > web > tomcat > tc6 > deployers > TomcatDeployerMBean


1 /*
2 * JBoss, Home of Professional Open Source
3 * Copyright 2005, JBoss Inc., and individual contributors as indicated
4 * by the @authors tag. See the copyright.txt in the distribution for a
5 * full listing of individual contributors.
6 *
7 * This is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU Lesser General Public License as
9 * published by the Free Software Foundation; either version 2.1 of
10 * the License, or (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this software; if not, write to the Free
19 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21 */

22 package org.jboss.web.tomcat.tc6.deployers;
23
24 import javax.management.ObjectName JavaDoc;
25
26 import org.jboss.mx.util.ObjectNameFactory;
27 import org.jboss.security.plugins.JaasSecurityManagerServiceMBean;
28 import org.jboss.web.AbstractWebContainerMBean;
29 import org.jboss.web.deployers.AbstractWarDeployerMBean;
30
31 /**
32  * An implementation of the AbstractWebContainer for the Jakarta Tomcat5
33  * servlet container. It has no code dependency on tomcat - only the new JMX
34  * model is used.
35  * <p/>
36  * Tomcat5 is organized as a set of mbeans - just like jboss.
37  *
38  * @author Scott.Stark@jboss.org
39  * @author Costin Manolache
40  * @version $Revision: 45726 $
41  * @see AbstractWebContainerMBean
42  */

43 public interface TomcatDeployerMBean extends AbstractWarDeployerMBean
44 {
45    // default object name
46
public static final ObjectName JavaDoc OBJECT_NAME = ObjectNameFactory.create("jboss.web:service=WebServer");
47    
48    /** JMX notification type to signal after-start connector event */
49    public final String JavaDoc TOMCAT_CONNECTORS_STARTED = "jboss.tomcat.connectors.started";
50    
51    /**
52     * @return the jmx domain for the tomcat management mbeans
53     */

54    public String JavaDoc getDomain();
55
56    /**
57     * The most important attribute - defines the managed domain.
58     * A catalina instance (engine) corresponds to a JMX domain, that's
59     * how we know where to deploy webapps.
60     *
61     * @param domainName the jmx domain under which tc registers
62     */

63    public void setDomain(String JavaDoc domainName);
64
65    /**
66     * Set the snapshot mode in a clustered environment
67     */

68    public void setSnapshotMode(String JavaDoc mode);
69
70    /**
71     * Get the snapshot mode in a clustered environment
72     */

73    public String JavaDoc getSnapshotMode();
74
75    /**
76     * Set the snapshot interval in ms for the interval snapshot mode
77     */

78    public void setSnapshotInterval(int interval);
79
80    /**
81     * Get the snapshot interval
82     */

83    public int getSnapshotInterval();
84
85    /**
86     * Get the clustering code cache behaviour
87     */

88    public boolean isUseLocalCache();
89
90    /**
91     * Set the clustering code cache behaviour
92     */

93    public void setUseLocalCache(boolean useLocalCache);
94
95    /**
96     * Get the clustering code failover behaviour whether MOD_JK(2) is used or not.
97     */

98    public boolean isUseJK();
99
100    /**
101     * Set the clustering code failover behaviour whether MOD_JK(2) is used or not.
102     */

103    public void setUseJK(boolean useJK);
104
105    /**
106     * The SessionIdAlphabet is the set of characters used to create a session Id
107     */

108    public void setSessionIdAlphabet(String JavaDoc sessionIdAlphabet);
109
110    /**
111     * The SessionIdAlphabet is the set of characters used to create a session Id
112     */

113    public String JavaDoc getSessionIdAlphabet();
114    
115    /**
116     * Gets the JMX object name of a shared TreeCache to be used for clustered
117     * single-sign-on.
118     *
119     * @see org.jboss.web.tomcat.tc6.sso.TreeCacheSSOClusterManager
120     */

121    public String JavaDoc getCacheName();
122
123    /**
124     * Gets the JMX object name of a shared TreeCache to be used for clustered
125     * single-sign-on.
126     * <p/>
127     * <b>NOTE:</b> TreeCache must be deployed before this service.
128     *
129     * @see org.jboss.web.tomcat.tc6.sso.TreeCacheSSOClusterManager
130     */

131    public void setCacheName(String JavaDoc cacheName);
132
133    /**
134     * Get the JBoss UCL use flag
135     */

136    public boolean getUseJBossWebLoader();
137
138    /**
139     * Set the JBoss UCL use flag
140     */

141    public void setUseJBossWebLoader(boolean flag);
142
143    public String JavaDoc getManagerClass();
144
145    public void setManagerClass(String JavaDoc managerClass);
146
147    /** */
148    public String JavaDoc getContextMBeanCode();
149
150    /** */
151    public void setContextMBeanCode(String JavaDoc className);
152
153    /**
154     * Get the name of the external tomcat server configuration file.
155     *
156     * @return the config file name, server.xml for example
157     */

158    public String JavaDoc getConfigFile();
159
160    /**
161     * Set the name of the external tomcat server configuration file.
162     *
163     * @param configFile - the config file name, server.xml for example
164     */

165    public void setConfigFile(String JavaDoc configFile);
166
167    /**
168     * Get the request attribute name under which the JAAS Subject is store
169     */

170    public String JavaDoc getSubjectAttributeName();
171
172    /**
173     * Set the request attribute name under which the JAAS Subject will be
174     * stored when running with a security mgr that supports JAAS. If this is
175     * empty then the Subject will not be store in the request.
176     *
177     * @param name the HttpServletRequest attribute name to store the Subject
178     */

179    public void setSubjectAttributeName(String JavaDoc name);
180
181    /**
182     * Start all connectors of the Domain + ":type=Service,serviceName=jboss.web"
183     * service.
184     *
185     * @throws Exception
186     */

187    public void startConnectors() throws Exception JavaDoc;
188
189    /**
190     * Stop all connectors of the Domain + ":type=Service,serviceName=jboss.web"
191     * service.
192     *
193     * @throws Exception
194     */

195    public void stopConnectors() throws Exception JavaDoc;
196
197    /**
198     * Get whether web-apps are able to control the privileged flag
199     */

200    public boolean isAllowSelfPrivilegedWebApps();
201
202    /**
203     * Set whether web-apps are able to control the privileged flag
204     */

205    public void setAllowSelfPrivilegedWebApps(boolean flag);
206
207    /** Set the SecurityManagerService binding. This is used to flush any
208     * associated authentication cache on session invalidation.
209     * @param mgr the JaasSecurityManagerServiceMBean
210     */

211    public void setSecurityManagerService(JaasSecurityManagerServiceMBean mgr);
212
213    /**
214     *
215     * @return
216     */

217    public String JavaDoc[] getFilteredPackages();
218    /**
219     *
220     * @param pkgs
221     */

222    public void setFilteredPackages(String JavaDoc[] pkgs);
223 }
224
Popular Tags