KickJava   Java API By Example, From Geeks To Geeks.

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


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 package com.sun.appserv.management.config;
26
27 import java.util.Map JavaDoc;
28 import java.util.List JavaDoc;
29
30 import com.sun.appserv.management.base.Container;
31 import com.sun.appserv.management.base.XTypes;
32 import com.sun.appserv.management.DomainRoot;
33
34
35 /**
36      Configuration for the <domain> element.
37     <p>
38     All configuration resides in a tree rooted at this .
39 */

40
41 public interface DomainConfig
42     extends PropertiesAccess, SystemPropertiesAccess,
43     ConfigElement, Container, ConfigRemover
44 {
45 /** The j2eeType as returned by {@link com.sun.appserv.management.base.AMX#getJ2EEType}. */
46     public static final String JavaDoc J2EE_TYPE = XTypes.DOMAIN_CONFIG;
47
48     /**
49         Create a new &lt;server&gt; given an existing config and node-agent.
50         These are required parameters for the server instance to be created.
51
52         @param name the name of the server to create
53         @param nodeAgentName the node agent that the server will reference
54         @param configName the config that the server will reference
55         @param optional properties for this new server
56           This is a Map object consisting of key/value for a given property, that can be applied to
57           this server instance. The Map may also contain additional properties that can be applied to this server instance.
58           <p>Note that Properties that relate to ports of listeners are stored as system-properties and have
59           specific key names and must be specified to override values defined in the config to any of the relevant
60           ports - this is particularly required when the instance being created is on the same machine as other
61           instances in the domain.
62           <p>Legal property keys are those found in {@link ServerConfigKeys}.
63
64         @return A proxy to the StandaloneServerConfig MBean that manages the newly created server
65      */

66     public StandaloneServerConfig createStandaloneServerConfig(String JavaDoc name, String JavaDoc nodeAgentName,
67             String JavaDoc configName, Map JavaDoc<String JavaDoc,String JavaDoc> optional);
68
69
70     
71
72     /**
73         Calls Container.getContaineeMap( XTypes.NODE_AGENT_CONFIG ).
74         @return Map of items, keyed by name.
75         @see com.sun.appserv.management.base.Container#getContaineeMap
76      */

77     public Map JavaDoc<String JavaDoc,NodeAgentConfig> getNodeAgentConfigMap();
78     
79     /**
80         Calls Container.getContaineeMap( XTypes.CONFIG_CONFIG ).
81         @return Map of items, keyed by name.
82         @see com.sun.appserv.management.base.Container#getContaineeMap
83      */

84     public Map JavaDoc<String JavaDoc,ConfigConfig> getConfigConfigMap();
85     
86     /**
87         Create a new &lt;config&gt; element. Legal keys in the optional Map include:
88         <ul>
89         <li>{@link ConfigConfigKeys#DYNAMIC_RECONFIGURATION_ENABLED_KEY}</li>
90         <li>{@link ConfigConfigKeys#SRC_CONFIG_NAME_KEY}</li>
91         </ul>
92         <p>
93         A new config is created by copying an existing one. Unless a specific
94         config is specified via {@link ConfigConfigKeys#SRC_CONFIG_NAME_KEY},
95         the default config as given by {@link ConfigConfigKeys#DEFAULT_SRC_CONFIG_NAME}
96         will be copied.
97         <p>
98         Depending on the context in which the config is to be used, it may or may
99         not conflict with values found in other configs.
100
101         @param name name of the &lt;config>
102         @param optional optional attributes for config creation
103         @return Returns a proxy to the ConfigConfig MBean.
104         @see ConfigConfigKeys
105     */

106     public ConfigConfig createConfigConfig( String JavaDoc name, Map JavaDoc<String JavaDoc,String JavaDoc> optional );
107
108     /**
109         Remove a config. This will fail if any <server> or <cluster>
110         refers to it.
111
112         @param name The config name.
113     */

114     public void removeConfigConfig( String JavaDoc name );
115     
116     /**
117         Calls Container.getContaineeMap( XTypes.STANDALONE_SERVER_CONFIG ).
118         @return Map of items, keyed by name.
119         @see com.sun.appserv.management.base.Container#getContaineeMap
120      */

121     public Map JavaDoc<String JavaDoc,StandaloneServerConfig> getStandaloneServerConfigMap();
122     
123     /**
124         Calls Container.getContaineeMap( XTypes.CLUSTERED_SERVER_CONFIG ).
125         @return Map of items, keyed by name.
126         @see com.sun.appserv.management.base.Container#getContaineeMap
127      */

128     public Map JavaDoc<String JavaDoc,ClusteredServerConfig> getClusteredServerConfigMap();
129     
130     public void removeStandaloneServerConfig( String JavaDoc name );
131     public void removeClusteredServerConfig( String JavaDoc name );
132                    
133     /**
134      * Creates a new &lt;server&gt; that belongs to a cluster.
135
136      @param name Name of the server.
137      @param nodeAgentName Name of the node agent that should manage this instance
138      @param clusterName Name of the cluster to which this server should belong.
139         <p>Note that it is prefereable to pass in an existing nodeagent's name. A non-existent nodeagent name can be
140         passed in but this nodeagent's hostname attribute will be marked as "localhost" as an assumption is made that the
141         nodeagent is local. The nodeagent should be created through the create-node-agent command
142         using the Command Line Interface(CLI) on the machine where this instance is intended to reside after this create()
143         operation. Prior to starting this instance, that nodeagent will have to be started using the CLI command
144         start-node-agent.
145      @param optional Attributes and properties for this new server.
146        <p>Note that Properties that relate to ports of listeners are stored as system-properties and have
147        specific key names and must be specified to override values defined in the config to any of the relevant
148        ports - this is particularly required when the instance being created is on the same machine as other
149        instances in the domain.
150        <p>Legal keys are those defined in {@link ServerConfigKeys}.
151
152      @return A proxy to the ClusteredServerConfig MBean.
153      */

154     public ClusteredServerConfig createClusteredServerConfig(String JavaDoc name,
155             String JavaDoc clusterName, String JavaDoc nodeAgentName,
156             java.util.Map JavaDoc<String JavaDoc,String JavaDoc> optional);
157     
158     /**
159         Combines the results of getStandaloneServerConfigMap() and
160         getClusteredServerConfigMap().
161         @return Map of items, keyed by name.
162         @see com.sun.appserv.management.base.Container#getContaineeMap
163      */

164     public Map JavaDoc<String JavaDoc,ServerConfig> getServerConfigMap();
165
166     /**
167         Calls Container.getContaineeMap( XTypes.CLUSTER_CONFIG ).
168         @return Map of items, keyed by name.
169         @see com.sun.appserv.management.base.Container#getContaineeMap
170      */

171     public Map JavaDoc<String JavaDoc,ClusterConfig> getClusterConfigMap();
172     
173         /**
174         Create a new ClusterConfig. The 'referencedConfigName' must be non-null
175         and must not be "default-config" or "server-config". If it is desired
176         to create a new ClusterConfig which uses a copy of default-config,
177         use the createClusterConfig( name, reserved ) form.
178
179         @param name the name of the cluster to create.
180         @param referencedConfigName the non-null name of the config to reference.
181         @param optional optional values, properties only
182
183         @return a ClusterConfig
184      */

185     public ClusterConfig createClusterConfig(String JavaDoc name, String JavaDoc referencedConfigName,
186                 Map JavaDoc<String JavaDoc,String JavaDoc> optional);
187                 
188     /**
189             Create a new ClusterConfig which refers to a copy of the default-config.
190
191             @param name the name of the cluster to create.
192             @param optional optional values, properties only
193
194             @return a ClusterConfig
195      */

196     public ClusterConfig createClusterConfig(String JavaDoc name, Map JavaDoc<String JavaDoc,String JavaDoc> optional);
197
198     /**
199           Remove an existing &lt;cluster&gt;.
200           @param name the name of the cluster to remove.
201      */

202     public void removeClusterConfig(String JavaDoc name);
203     
204     /**
205           Calls Container.getContaineeMap( XTypes.LOAD_BALANCER_CONFIG).
206           @return Map of items, keyed by name.
207           @see com.sun.appserv.management.base.Container#getContaineeMap
208     */

209         public Map JavaDoc<String JavaDoc,LoadBalancerConfig> getLoadBalancerConfigMap();
210
211         /**
212           Create a new LoadBalancer. The 'lbConfigName' and 'name' must be non-null.
213           @param name the name of the load balancer to create
214           @param lbConfigName the non-null name of the lb config to reference.
215           @param autoApplyEnabled flag to indicate if the LB changes are pushed
216                  immediately to the physical load balancer. Defaults to false
217           @param optional optional values, properties only
218           @return a LoadBalancer
219     */

220     public LoadBalancerConfig createLoadBalancerConfig(String JavaDoc name, String JavaDoc lbConfigName,
221                 boolean autoApplyEnabled, Map JavaDoc<String JavaDoc,String JavaDoc> optional);
222
223         /**
224           Remove an existing &lt;LoadBalancerConfig&gt;.
225           @param name the name of the load-balancer to remove.
226     */

227     public void removeLoadBalancerConfig(String JavaDoc name);
228
229         /**
230           Calls Container.getContaineeMap( XTypes.LB_CONFIG ).
231           @return Map of items, keyed by name.
232           @see com.sun.appserv.management.base.Container#getContaineeMap
233         */

234         public Map JavaDoc<String JavaDoc,LBConfig> getLBConfigMap();
235
236         /**
237           Creates a new lb-config. Legal options include:
238           <ul>
239              <li>{@link LBConfigKeys#RESPONSE_TIMEOUT_IN_SECONDS_KEY}</li>
240              <li>{@link LBConfigKeys#HTTPS_ROUTING_KEY}</li>
241              <li>{@link LBConfigKeys#RELOAD_POLL_INTERVAL_IN_SECONDS_KEY}</li>
242              <li>{@link LBConfigKeys#MONITORING_ENABLED_KEY}</li>
243              <li>{@link LBConfigKeys#ROUTE_COOKIE_ENABLED_KEY}</li>
244           </ul>
245           @param name The name of the load balancer configuration.
246           @param params Remaining attributes for creation of a new lb-config.
247           @return A proxy to the LBConfig MBean that manages the newly created lb-config.
248           @see LBConfigKeys
249          */

250         public LBConfig createLBConfig(String JavaDoc name, Map JavaDoc<String JavaDoc,String JavaDoc> params);
251
252         /**
253           Removes a lb-config.
254           @param name The name of the load balancer configuration.
255          */

256         public void removeLBConfig(String JavaDoc name);
257
258     
259     public String JavaDoc getApplicationRoot();
260     public void setApplicationRoot( final String JavaDoc value );
261
262     public String JavaDoc getLocale();
263     public void setLocale( final String JavaDoc value );
264
265     public String JavaDoc getLogRoot();
266     public void setLogRoot( final String JavaDoc value );
267     
268     
269     //---------------------------------------------------------------------------------------
270
/**
271         Calls Container.getContaineeMap( XTypes.CUSTOM_RESOURCE_CONFIG ).
272         @return Map of items, keyed by name.
273         @see com.sun.appserv.management.base.Container#getContaineeMap
274      */

275      
276     public Map JavaDoc<String JavaDoc,CustomResourceConfig> getCustomResourceConfigMap();
277     
278
279     /**
280         Creates a new custom resource.
281         <ul>
282         <li>{@link ResourceConfigKeys#ENABLED_KEY}</li>
283         </ul>
284
285         @param jndiName
286         @param resType
287         @param factoryClass
288         @param optional optional Attributes (may be null )
289         @return A proxy to the CustomResourceConfig MBean.
290      */

291     public CustomResourceConfig createCustomResourceConfig( String JavaDoc jndiName,
292                                                 String JavaDoc resType,
293                                                 String JavaDoc factoryClass,
294                                                 Map JavaDoc<String JavaDoc,String JavaDoc> optional );
295
296
297     /**
298         Removes a custom resource.
299
300         @param name The name of the custom resource.
301      */

302     public void removeCustomResourceConfig( String JavaDoc name );
303
304
305     
306     /**
307         Calls Container.getContaineeMap( XTypes.JNDI_RESOURCE_CONFIG ).
308         @return Map of items, keyed by name.
309         @see com.sun.appserv.management.base.Container#getContaineeMap
310      */

311     public Map JavaDoc<String JavaDoc,JNDIResourceConfig> getJNDIResourceConfigMap();
312     
313     /**
314         Creates a new &lt;external-jndi-resource&gt;. Optional values include:
315         <ul>
316         <li>{@link ResourceConfigKeys#ENABLED_KEY}</li>
317         </ul>
318
319         @param jndiName
320         @param jndiLookupName
321         @param resType
322         @param factoryClass
323         @param optional optional Attributes (may be null )
324         @return a JNDIResourceConfig
325     */

326     public JNDIResourceConfig createJNDIResourceConfig( String JavaDoc jndiName,
327                                     String JavaDoc jndiLookupName,
328                                     String JavaDoc resType,
329                                     String JavaDoc factoryClass,
330                                     Map JavaDoc<String JavaDoc,String JavaDoc> optional);
331
332     /**
333         Remove the &lt;external-jndi-resource&gt;.
334
335         @param jndiName The jndi name of the external jndi resource
336         to be removed.
337     */

338     public void removeJNDIResourceConfig( String JavaDoc jndiName );
339
340     
341     /**
342         Calls Container.getContaineeMap( XTypes.PERSISTENCE_MANAGER_FACTORY_RESOURCE_CONFIG ).
343         @return Map of items, keyed by name.
344         @see com.sun.appserv.management.base.Container#getContaineeMap
345      */

346     public Map JavaDoc<String JavaDoc,PersistenceManagerFactoryResourceConfig>
347         getPersistenceManagerFactoryResourceConfigMap();
348     
349     
350     /**
351         Create a new persistence manager factory resource. Optional values include:
352         <ul>
353         <li>{@link PersistenceManagerFactoryResourceConfigKeys#FACTORY_CLASS_KEY}</li>
354         <li>{@link PersistenceManagerFactoryResourceConfigKeys#JDBC_RESOURCE_JNDI_NAME_KEY}</li>
355         <li>{@link ResourceConfigKeys#ENABLED_KEY}</li>
356         </ul>
357
358         @param jndiName
359         @param optional optional Attributes (may be null )
360         @return A proxy to the PersistenceManagerFactoryResourceConfig MBean that
361         manages the newly created resource.
362         @see PersistenceManagerFactoryResourceConfigKeys
363     */

364     public PersistenceManagerFactoryResourceConfig
365         createPersistenceManagerFactoryResourceConfig( String JavaDoc jndiName, Map JavaDoc<String JavaDoc,String JavaDoc> optional);
366
367
368     /**
369         Removes a persistence manager factory resource.
370          
371         @param jndiName
372     */

373     public void removePersistenceManagerFactoryResourceConfig( String JavaDoc jndiName );
374
375     
376     /**
377         Calls Container.getContaineeMap( XTypes.JDBC_RESOURCE_CONFIG ).
378         @return Map of items, keyed by name.
379         @see com.sun.appserv.management.base.Container#getContaineeMap
380      */

381     public Map JavaDoc<String JavaDoc,JDBCResourceConfig> getJDBCResourceConfigMap();
382     
383     /**
384         Create a new &lt;jdbc-resource&gt; Optional parameters include:
385         <ul>
386         <li>{@link ResourceConfigKeys#ENABLED_KEY}</li>
387         </ul>
388
389         @param jndiName
390         @param poolName
391         @param optional optional Attributes (may be null )
392         @return A proxy to the JDBCResourceConfig MBean that manages the newly
393         created jdbc-resource.
394     */

395     public JDBCResourceConfig createJDBCResourceConfig( String JavaDoc jndiName,
396                                 String JavaDoc poolName,
397                                 Map JavaDoc<String JavaDoc,String JavaDoc> optional );
398         
399     /**
400         Removes a jdbc resource.
401
402         @param jndiName
403      */

404     public void removeJDBCResourceConfig( String JavaDoc jndiName );
405     
406     
407     /**
408         Calls Container.getContaineeMap( XTypes.JDBC_CONNECTION_POOL_CONFIG ).
409         @return Map of items, keyed by name.
410         @see com.sun.appserv.management.base.Container#getContaineeMap
411      */

412     public Map JavaDoc<String JavaDoc,JDBCConnectionPoolConfig> getJDBCConnectionPoolConfigMap();
413     
414         /**
415         Create a new &lt;jdbc-connection-pool&gt;.
416         
417         @param name name of the &lt;jdbc-connection-pool>
418         @param connectionValidationMethod
419         @param datasourceClassname
420         @param failAllConnections
421         @param idleTimeoutSeconds
422         @param connectionValidationRequired
423         @param isolationLevelGuaranteed
424         @param transactionIsolationLevel
425         @param maxPoolSize
426         @param maxWaitTimeMillis
427         @param poolResizeQuantity
428         @param resType
429         @param steadyPoolSize
430         @param databaseName
431         @param databaseUserName
432         @param databasePassword
433         @param reservedForFutureUse reserved for future use
434         @return a JDBCConnectionPoolConfig
435      */

436     public JDBCConnectionPoolConfig createJDBCConnectionPoolConfig( String JavaDoc name,
437                             String JavaDoc connectionValidationMethod,
438                             String JavaDoc datasourceClassname,
439                             boolean failAllConnections,
440                             int idleTimeoutSeconds,
441                             boolean connectionValidationRequired,
442                             boolean isolationLevelGuaranteed,
443                             String JavaDoc transactionIsolationLevel,
444                             int maxPoolSize,
445                             int maxWaitTimeMillis,
446                             int poolResizeQuantity,
447                             String JavaDoc resType,
448                             int steadyPoolSize,
449                             String JavaDoc databaseName,
450                             String JavaDoc databaseUserName,
451                             String JavaDoc databasePassword,
452                             Map JavaDoc<String JavaDoc,String JavaDoc> reservedForFutureUse );
453         
454     /**
455         Create a new &lt;jdbc-connection-pool>. Legal optional attributes include:
456         
457     <ul>
458     <li>{@link JDBCConnectionPoolConfigKeys#CONNECTION_VALIDATION_METHOD_KEY}</li>
459     <li>{@link JDBCConnectionPoolConfigKeys#VALIDATION_TABLE_NAME_KEY}</li>
460     <li>{@link JDBCConnectionPoolConfigKeys#FAIL_ALL_CONNECTIONS_KEY}</li>
461     <li>{@link JDBCConnectionPoolConfigKeys#IDLE_TIMEOUT_IN_SECONDS_KEY}</li>
462     <li>{@link JDBCConnectionPoolConfigKeys#IS_CONNECTION_VALIDATION_REQUIRED_KEY}</li>
463     <li>{@link JDBCConnectionPoolConfigKeys#IS_ISOLATION_LEVEL_GUARANTEED_KEY}</li>
464     <li>{@link JDBCConnectionPoolConfigKeys#TRANSACTION_ISOLATION_LEVEL_KEY}</li>
465     <li>{@link JDBCConnectionPoolConfigKeys#MAX_POOL_SIZE_KEY}</li>
466     <li>{@link JDBCConnectionPoolConfigKeys#MAX_WAIT_TIME_MILLIS_KEY}</li>
467     <li>{@link JDBCConnectionPoolConfigKeys#POOL_RESIZE_QUANTITY_KEY}</li>
468     <li>{@link JDBCConnectionPoolConfigKeys#RES_TYPE_KEY}</li>
469     <li>{@link JDBCConnectionPoolConfigKeys#STEADY_POOL_SIZE_KEY}</li>
470     <li>{@link JDBCConnectionPoolConfigKeys#DATABASE_NAME_KEY}</li>
471     <li>{@link JDBCConnectionPoolConfigKeys#DATABASE_USER_KEY}</li>
472     <li>{@link JDBCConnectionPoolConfigKeys#DATABASE_PASSWORD_KEY}</li>
473     </ul>
474
475         @param name name of the &lt;jdbc-connection-pool>
476         @param datasourceClassname
477         @param optional optional parameters
478         @return a JDBCConnectionPoolConfig
479     */

480     public JDBCConnectionPoolConfig createJDBCConnectionPoolConfig( String JavaDoc name,
481                                 String JavaDoc datasourceClassname, Map JavaDoc<String JavaDoc,String JavaDoc> optional);
482
483     /**
484         Remove the &lt;jdbc-connection-pool&gt;.
485         
486         @param jdbcConnectionPoolName
487      */

488     public void removeJDBCConnectionPoolConfig( String JavaDoc jdbcConnectionPoolName );
489     
490     
491     /**
492         Calls Container.getContaineeMap( XTypes.CONNECTOR_RESOURCE_CONFIG ).
493         @return Map of items, keyed by name.
494         @see com.sun.appserv.management.base.Container#getContaineeMap
495      */

496     public Map JavaDoc<String JavaDoc,ConnectorResourceConfig> getConnectorResourceConfigMap();
497     
498     /**
499         Creates a new &lt;connector-resource&gt;
500         Legal optional keys include:
501         <ul>
502         <li>ResourceConfigKeys#ENABLED_KEY</li>
503         </ul>
504
505         @param jndiName
506         @param poolName
507         @param optional optional parameters (may be null).
508     */

509     public ConnectorResourceConfig createConnectorResourceConfig( String JavaDoc jndiName,
510                            String JavaDoc poolName,
511                            Map JavaDoc<String JavaDoc,String JavaDoc> optional );
512     
513         
514     /**
515     Removes a connector resource.
516
517     @param jndiName
518     */

519     public void removeConnectorResourceConfig( String JavaDoc jndiName );
520     
521     
522     /**
523         Calls Container.getContaineeMap( XTypes.CONNECTOR_CONNECTION_POOL_CONFIG ).
524         @return Map of items, keyed by name.
525         @see com.sun.appserv.management.base.Container#getContaineeMap
526      */

527     public Map JavaDoc<String JavaDoc,ConnectorConnectionPoolConfig> getConnectorConnectionPoolConfigMap();
528     
529     /**
530     Creates a new &lt;connector-connection-pool&gt;
531     Valid keys in optional map include:
532     <ul>
533     <li>{@link ConnectorConnectionPoolConfigKeys#STEADY_POOL_SIZE_KEY}</li>
534     <li>{@link ConnectorConnectionPoolConfigKeys#MAX_POOL_SIZE_KEY}</li>
535     <li>{@link ConnectorConnectionPoolConfigKeys#MAX_WAIT_TIME_IN_MILLIS_KEY}</li>
536     <li>{@link ConnectorConnectionPoolConfigKeys#POOL_RESIZE_QUANTITY_KEY}</li>
537     <li>{@link ConnectorConnectionPoolConfigKeys#IDLE_TIMEOUT_IN_SECONDS_KEY}</li>
538     <li>{@link ConnectorConnectionPoolConfigKeys#FAIL_ALL_CONNECTIONS_KEY}</li>
539     <li>{@link ConnectorConnectionPoolConfigKeys#TRANSACTION_SUPPORT_KEY}</li>
540     <li>{@link ConnectorConnectionPoolConfigKeys #TRANSACTION_SUPPORT_KEY}</li>
541     </ul>
542
543     @param name pool name.
544     @param resourceAdapterName
545     @param connectionDefinitionName unique name, identifying one
546     connection-definition in a Resource Adapter.
547     @param optional
548     @return A proxy to the ConnectorConnectionPoolConfig MBean
549     that manages the newly created connector-connection-pool element.
550     @see ConnectorConnectionPoolConfigKeys
551     */

552     public ConnectorConnectionPoolConfig createConnectorConnectionPoolConfig( String JavaDoc name,
553              String JavaDoc resourceAdapterName,
554              String JavaDoc connectionDefinitionName,
555              Map JavaDoc<String JavaDoc,String JavaDoc> optional );
556
557     /**
558         Removes a connector connection pool.
559
560         @param name pool name.
561     */

562     public void removeConnectorConnectionPoolConfig( String JavaDoc name );
563     
564     /**
565         Calls Container.getContaineeMap( XTypes.ADMIN_OBJECT_RESOURCE_CONFIG ).
566         @return Map of items, keyed by name.
567         @see com.sun.appserv.management.base.Container#getContaineeMap
568      */

569     public Map JavaDoc<String JavaDoc,AdminObjectResourceConfig> getAdminObjectResourceConfigMap();
570     
571     /**
572         Creates a new &lt;admin-object-resource&gt;.
573         <ul>
574         <li>{@link ResourceConfigKeys#ENABLED_KEY}</li>
575         </ul>
576
577         @param jndiName JNDI name of the resource.
578         @param resType
579         @param resAdapter Name of the inbound resource adapter.
580         @param optional optional Attributes (may be null )
581         @return A proxy to the AdminObjectResourceConfig MBean.
582      */

583     public AdminObjectResourceConfig createAdminObjectResourceConfig( String JavaDoc jndiName,
584                                String JavaDoc resType,
585                                String JavaDoc resAdapter,
586                                Map JavaDoc<String JavaDoc,String JavaDoc> optional );
587     
588     /**
589         Removes an admin object resource.
590
591         @param jndiName JNDI name of the resource.
592      */

593     public void removeAdminObjectResourceConfig( String JavaDoc jndiName );
594     
595     
596     /**
597         Calls Container.getContaineeMap( XTypes.RESOURCE_ADAPTER_CONFIG ).
598         @return Map of AMXs, keyed by name.
599         @see com.sun.appserv.management.base.Container#getContaineeMap
600      */

601     public Map JavaDoc<String JavaDoc,ResourceAdapterConfig> getResourceAdapterConfigMap();
602     
603     /**
604         Legal options include:
605         <ul>
606         <li>{@link ResourceAdapterConfigKeys#THREAD_POOL_IDS_KEY}</li>
607         </ul>
608      */

609     public ResourceAdapterConfig createResourceAdapterConfig( String JavaDoc resourceAdapterName, Map JavaDoc<String JavaDoc,String JavaDoc> optional );
610     public void removeResourceAdapterConfig( String JavaDoc resourceAdapterName );
611     
612     
613     /**
614         Calls Container.getContaineeMap( XTypes.MAIL_RESOURCE_CONFIG ).
615         @return Map of s, keyed by name.
616         @see com.sun.appserv.management.base.Container#getContaineeMap
617      */

618     public Map JavaDoc<String JavaDoc,MailResourceConfig> getMailResourceConfigMap();
619     
620     /**
621         Create a new &lt;mail-resource>. Optional keys are:
622         <ul>
623         <li>{@link MailResourceConfigKeys#STORE_PROTOCOL_KEY}</li>
624         <li>{@link MailResourceConfigKeys#STORE_PROTOCOL_CLASS_KEY}</li>
625         <li>{@link MailResourceConfigKeys#TRANSPORT_PROTOCOL_KEY}</li>
626         <li>{@link MailResourceConfigKeys#TRANSPORT_PROTOCOL_CLASS_KEY}</li>
627         <li>{@link MailResourceConfigKeys#DEBUG_KEY}</li>
628         </ul>
629
630
631         @param jndiName
632         @param host
633         @param user
634         @param from
635         @param optional
636         @return A MailResourceConfig.
637         @see MailResourceConfigKeys
638     */

639     public MailResourceConfig createMailResourceConfig( String JavaDoc jndiName,
640                         String JavaDoc host,
641                         String JavaDoc user,
642                         String JavaDoc from,
643                         Map JavaDoc<String JavaDoc,String JavaDoc> optional);
644
645     /**
646         Removes a mail resource.
647
648         @param jndiName
649     */

650     public void removeMailResourceConfig( String JavaDoc jndiName );
651     
652     /**
653         @return Map, keyed by name of {@link J2EEApplicationConfig}
654         @see #getEJBModuleConfigMap
655         @see #getWebModuleConfigMap
656         @see #getAppClientModuleConfigMap
657         @see #getRARModuleConfigMap
658         @see #getLifecycleModuleConfigMap
659      */

660     public Map JavaDoc<String JavaDoc,J2EEApplicationConfig> getJ2EEApplicationConfigMap();
661     
662     
663     /**
664         @return Map, keyed by name of {@link EJBModuleConfig}.
665         @see #getJ2EEApplicationConfigMap
666         @see #getWebModuleConfigMap
667         @see #getAppClientModuleConfigMap
668         @see #getRARModuleConfigMap
669         @see #getLifecycleModuleConfigMap
670      */

671     public Map JavaDoc<String JavaDoc,EJBModuleConfig> getEJBModuleConfigMap( );
672     
673     /**
674         @return Map, keyed by name of {@link WebModuleConfig}.
675         @see #getJ2EEApplicationConfigMap
676         @see #getEJBModuleConfigMap
677         @see #getAppClientModuleConfigMap
678         @see #getRARModuleConfigMap
679         @see #getLifecycleModuleConfigMap
680      */

681     public Map JavaDoc<String JavaDoc,WebModuleConfig> getWebModuleConfigMap( );
682     
683     /**
684         @return Map, keyed by name of {@link RARModuleConfig}.
685         @see #getJ2EEApplicationConfigMap
686         @see #getWebModuleConfigMap
687         @see #getEJBModuleConfigMap
688         @see #getAppClientModuleConfigMap
689         @see #getLifecycleModuleConfigMap
690      */

691     public Map JavaDoc<String JavaDoc,RARModuleConfig> getRARModuleConfigMap();
692     
693     /**
694         @return Map, keyed by name of {@link AppClientModuleConfig}.
695         @see #getJ2EEApplicationConfigMap
696         @see #getWebModuleConfigMap
697         @see #getEJBModuleConfigMap
698         @see #getRARModuleConfigMap
699         @see #getLifecycleModuleConfigMap
700      */

701     public Map JavaDoc<String JavaDoc,AppClientModuleConfig> getAppClientModuleConfigMap();
702     
703     /**
704         @return Map, keyed by name of {@link LifecycleModuleConfig}.
705      */

706     public Map JavaDoc<String JavaDoc,LifecycleModuleConfig> getLifecycleModuleConfigMap();
707     
708     /**
709         Create a new lifecycle module. A Lifecycle Module must
710         implement the interface
711         <code>com.sun.appserv.server.LifecycleListener</code>,
712         which is outside the scope of AMX, see the product
713         documentation.
714         <p>
715         The 'loadOrder' parameter must be a positive integer value
716         (eg >= 1) can be used to force the order in which
717         deployed lifecycle modules are loaded at server start up.
718         Smaller numbered modules get loaded sooner. Order is
719         unspecified if two or more lifecycle modules have the same
720         load-order value.
721         <p>
722         If 'isFailureFatal' is true,server startup will fail when
723         this module does not load properly.
724
725         @param name the name for the new lifecycle module
726         @param description optional description
727         @param classname the classname associated with this lifecycle module
728         @param classpath optional additioinal classpath
729         @param loadOrder integer value to force loading order of LifecycleModules
730         @param isFailureFatal if true, server startup will fail when
731                 this module does not load properly.
732         @param enabled whether to load the module at startup
733         @return a LifecycleModuleConfig
734     */

735     public LifecycleModuleConfig createLifecycleModuleConfig( String JavaDoc name,
736                                 String JavaDoc description,
737                                 String JavaDoc classname,
738                                 String JavaDoc classpath,
739                                 String JavaDoc loadOrder,
740                                 boolean isFailureFatal,
741                                 boolean enabled,
742                                 Map JavaDoc<String JavaDoc,String JavaDoc> reserved );
743
744     /**
745         Removes an existing lifecycle module.
746             
747         @param name the name of the lifecycle module to be removed.
748     */

749     public void removeLifecycleModuleConfig( String JavaDoc name );
750     
751
752     /**
753         Get a ResourceConfig of any kind.
754         @param name
755      */

756     public ResourceConfig getResourceConfig( String JavaDoc name );
757
758     /**
759         Create a new {@link CustomMBeanConfig}.
760         The 'implClassname' must specify a valid classname. If invalid,
761         the CustomMBeanConfig will still be created, but of course the MBean
762         will not be loaded.
763         <p>
764         Any number of properties may be included by adding them to the
765         Map 'optional'. See {@link PropertiesAccess} for details.
766         <p>
767         See {@link CustomMBeanConfig} for details on valid values
768         for the 'objectNameProperties' parameter, and for details on
769         the ObjectName with which the MBean will be registered.
770         <p>
771         <b>Questions</b>
772         <ul>
773         <li>
774             Where do you put the jar file for the mbean so that it can
775             be loaded?
776         </li>
777         <li>
778             What is the behavior if the user
779             creates a CustomMBeanConfig specifying 'objectName' with the following:<br>
780             "", "user:", "name=foo", "amx:name=foo", "name=foo,type=bar",":".
781             <p>
782             What are the resulting ObjectNames produced by the above, and how
783             are they obtained?
784         </li>
785         </ul>
786
787         @param name the display name, will be the name used in the ObjectName 'name' property
788         @param implClassname the implementing class
789         @param objectName the partial ObjectName used when registering the MBean
790         new module
791         @param enabled whether the MBean should load
792         @param reserved reserved
793     */

794     public CustomMBeanConfig createCustomMBeanConfig(
795                                     String JavaDoc name,
796                                     String JavaDoc implClassname,
797                                     String JavaDoc objectName,
798                                     boolean enabled,
799                                     Map JavaDoc<String JavaDoc,String JavaDoc> reserved );
800                                     
801     /**
802         Remove a CustomMBeanConfig. All references to it are also removed.
803         <p>
804         <b>Questions</b>
805         <ul>
806         <li>Are running MBeans first stopped?</li>
807         </ul>
808         @param name name as returned by {@link CustomMBeanConfig#getName}
809      */

810     public void removeCustomMBeanConfig( String JavaDoc name );
811         
812     
813     /**
814         @return Map, keyed by name of {@link CustomMBeanConfig}.
815      */

816     public Map JavaDoc<String JavaDoc,CustomMBeanConfig> getCustomMBeanConfigMap();
817     
818 }
819
820
821
822
823
824
825
826
827
828
829
830
Popular Tags