KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > appserv > management > config > HTTPServiceConfig


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23  
24 /*
25  * $Header: /cvs/glassfish/admin-core/mbeanapi/src/java/com/sun/appserv/management/config/HTTPServiceConfig.java,v 1.4 2006/03/09 20:30:23 llc Exp $
26  * $Revision: 1.4 $
27  * $Date: 2006/03/09 20:30:23 $
28  */

29
30
31 package com.sun.appserv.management.config;
32
33 import java.util.Map JavaDoc;
34
35 import com.sun.appserv.management.base.XTypes;
36 import com.sun.appserv.management.base.Container;
37
38 /**
39      Configuration for the <http-service> element.
40  */

41 public interface HTTPServiceConfig
42     extends ConfigElement, PropertiesAccess, Container
43 {
44 /** The j2eeType as returned by {@link com.sun.appserv.management.base.AMX#getJ2EEType}. */
45     public static final String JavaDoc J2EE_TYPE = XTypes.HTTP_SERVICE_CONFIG;
46     
47     /**
48         Calls Container.getContaineeMap( XTypes.HTTP_LISTENER_CONFIG ).
49         @return Map of all HTTPListenerConfig proxies, keyed by the name of the listener.
50         @see com.sun.appserv.management.base.Container#getContaineeMap
51      */

52     public Map JavaDoc<String JavaDoc,HTTPListenerConfig> getHTTPListenerConfigMap();
53     
54     /**
55         Calls Container.getContaineeMap( XTypes.VIRTUAL_SERVER_CONFIG ).
56         @return Map of all VirtualServerConfig proxies, keyed by the name of the virtual server.
57         @see com.sun.appserv.management.base.Container#getContaineeMap
58      */

59     public Map JavaDoc<String JavaDoc,VirtualServerConfig> getVirtualServerConfigMap( );
60     
61     
62
63     /**
64         Creates access-log element with the given params.
65         @param params
66         @return Proxy to the AccessLogConfig MBean
67         @see AccessLogConfigKeys
68      */

69     public AccessLogConfig createAccessLogConfig( Map JavaDoc<String JavaDoc,String JavaDoc> params );
70
71     /**
72         Removes access-log element.
73      */

74     public void removeAccessLogConfig();
75
76     /**
77         Creates request-processing element with the given params.
78         @param params
79         @return Proxy to the RequestProcessingConfig MBean
80         @see RequestProcessingConfigKeys
81      */

82     public RequestProcessingConfig createRequestProcessingConfig( Map JavaDoc<String JavaDoc,String JavaDoc> params );
83
84     /**
85         Removes request-processing element.
86      */

87     public void removeRequestProcessingConfig();
88
89     /**
90         @return Proxy to the KeepAliveConfig MBean
91      */

92     public KeepAliveConfig getKeepAliveConfig();
93
94     /**
95         Creates keep-alive element with the given params.
96         @param params
97         @return Proxy to the KeepAliveConfig MBean
98         @see KeepAliveConfigKeys
99      */

100     public KeepAliveConfig createKeepAliveConfig( Map JavaDoc<String JavaDoc,String JavaDoc> params );
101
102     /**
103         Removes keep-alive element.
104      */

105     public void removeKeepAliveConfig();
106
107     /**
108         Creates connection-pool element with the given params.
109         @param params
110         @return the ObjectName of the ConnectionPoolConfig
111         @see ConnectionPoolConfigKeys
112      */

113     public ConnectionPoolConfig createConnectionPoolConfig( Map JavaDoc<String JavaDoc,String JavaDoc> params );
114
115     /**
116         Removes connection-pool element.
117      */

118     public void removeConnectionPoolConfig();
119
120     /**
121         @return Proxy to the HTTPProtocolConfig MBean
122      */

123     public HTTPProtocolConfig getHTTPProtocolConfig();
124
125     /**
126         Creates http-protocol element with the given params.
127         @param params
128         @return Proxy to the HTTPProtocolConfig MBean
129         @see HTTPProtocolConfigKeys
130      */

131     public HTTPProtocolConfig createHTTPProtocolConfig( Map JavaDoc<String JavaDoc,String JavaDoc> params );
132
133     /**
134         Removes http-protocol element.
135      */

136     public void removeHTTPProtocolConfig();
137
138     /**
139         @return Proxy to the HTTPFileCacheConfig MBean
140      */

141     public HTTPFileCacheConfig getHTTPFileCacheConfig();
142
143     /**
144         Creates http-file-cache element with the given params.
145         @param params
146         @return Proxy to the HTTPFileCacheConfig MBean
147         @see HTTPFileCacheConfigKeys
148      */

149     public HTTPFileCacheConfig createHTTPFileCacheConfig( Map JavaDoc<String JavaDoc,String JavaDoc> params );
150
151     /**
152         Removes http-file-cache element.
153      */

154     public void removeHTTPFileCacheConfig();
155
156
157
158     /**
159         Create an <http-listener>
160         Parameters:
161         <ul>
162         <li>{@link HTTPListenerConfigKeys#ADDRESS_KEY}</li>
163         <li>{@link HTTPListenerConfigKeys#PORT_KEY}</li>
164         <li>{@link HTTPListenerConfigKeys#ENABLED_KEY}</li>
165         <li>{@link HTTPListenerConfigKeys#SECURITY_ENABLED_KEY}</li>
166         <li>{@link HTTPListenerConfigKeys#DEFAULT_VIRTUAL_SERVER_KEY}</li>
167         <li>{@link HTTPListenerConfigKeys#ACCEPTOR_THREADS_KEY}</li>
168         <li>{@link HTTPListenerConfigKeys#XPOWERED_BY_KEY}</li>
169         <li>{@link HTTPListenerConfigKeys#XPOWERED_BY_KEY}</li>
170         <li>{@link HTTPListenerConfigKeys#IGNORE_MISSING_REFERENCES_KEY} (for defaultVirtualServer)</li>
171         </ul>
172      
173         
174         @param name the name (id) of the newly created listener
175         @param address IP address of the listener
176         @param port port of the listener
177         @param defaultVirtualServer The name of the default
178         virtual server for this particular connection group.
179         @param serverName
180         @param optional optional parameters keyed by one of XXX_KEY
181         @return A proxy to the HTTPListenerConfig MBean
182         @see HTTPListenerConfigKeys
183      */

184     public HTTPListenerConfig createHTTPListenerConfig(
185                             String JavaDoc name,
186                             String JavaDoc address,
187                             int port,
188                             String JavaDoc defaultVirtualServer,
189                             String JavaDoc serverName,
190                             Map JavaDoc<String JavaDoc,String JavaDoc> optional );
191     
192     /**
193         Remove the &lt;http-listener>. Will fail if the &lt;http-listener> is referred to by
194         other elements.
195         @param name the name (id) of the http listener to be removed.
196      */

197     public void removeHTTPListenerConfig( String JavaDoc name );
198     
199     /**
200         Create a <virtual-server>.
201         Most fields will default to reasonable values. Legal keys include:
202         <ul>
203             {@link VirtualServerConfigKeys#HTTP_LISTENERS_KEY}</li>
204             {@link VirtualServerConfigKeys#STATE_KEY}</li>
205             {@link VirtualServerConfigKeys#DOC_ROOT_PROPERTY_KEY}</li>
206             {@link VirtualServerConfigKeys#ACCESS_LOG_PROPERTY_KEY}</li>
207         </ul>
208         
209         @param name the name (id) of the newly created virtual server
210         @param hosts comma-separated list of hosts
211         @param optional optional params
212         @return A proxy to the VirtualServerConfig MBean.
213         @see VirtualServerConfigKeys
214      */

215     public VirtualServerConfig createVirtualServerConfig(
216                             String JavaDoc name,
217                             String JavaDoc hosts,
218                             Map JavaDoc<String JavaDoc,String JavaDoc> optional );
219     
220     /**
221         Remove the &lt;virtual-server&gt;.
222         Will fail if the &lt;virtual-server&gt is referred to by
223         other elements.
224         
225         @param virtualServerName
226      */

227     public void removeVirtualServerConfig( String JavaDoc virtualServerName );
228     
229     
230
231     /**
232         Get the AccessLogConfig.
233      */

234     public AccessLogConfig getAccessLogConfig();
235
236     /**
237         Get the RequestProcessingConfig.
238      */

239     public RequestProcessingConfig getRequestProcessingConfig();
240
241     /**
242         Get the ConnectionPoolConfig.
243      */

244     public ConnectionPoolConfig getConnectionPoolConfig();
245
246 }
247
Popular Tags