KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sape > carbon > services > carbonmanagement > CarbonManagementService


1 package org.sape.carbon.services.carbonmanagement;
2
3 import java.util.Map JavaDoc;
4
5 import org.sape.carbon.core.component.FunctionalInterface;
6
7 /**
8  * This services exposes methods that are helpful in managing aspects of the
9  * Carbon core services of Configuration, Components, and DeploymentProperties.
10  *
11  * Copyright 2002 Sapient
12  * @since carbon 1.2
13  * @author Douglas Voet, Dec 19, 2002
14  * @version $Revision: 1.5 $($Author: jreed $ / $Date: 2003/04/15 18:53:53 $)
15  */

16 public interface CarbonManagementService extends FunctionalInterface {
17
18     /**
19      * Returns the configuration named by configurationPath as an XML String.
20      *
21      * @param configurationPath name of the configuration to view
22      * @return String XML representation of configuration named by
23      * configurationPath
24      * @throws ConfigurationNotFoundException if configurationPath is not found
25      */

26     String JavaDoc viewConfigurationXML(String JavaDoc configurationPath)
27         throws ConfigurationNotFoundException;
28
29     /**
30      * Returns the entire configuration hierachy in a tree view
31      *
32      * @return String tree view of the configuration hierachy
33      */

34     String JavaDoc viewConfigurationTree();
35
36     /**
37      * Refreshes all configurations loaded in the system.
38      */

39     void refreshAllConfigurations();
40
41     /**
42      * Refreshes the configuration identified by configurationPath
43      * @param configurationPath name of the configuration to refresh
44      * @throws ConfigurationNotFoundException if configurationPath is not found
45      */

46     void refreshConfiguration(String JavaDoc configurationPath)
47         throws ConfigurationNotFoundException;
48
49     /**
50      * Refreshes all the components loaded in the system.
51      */

52     void refreshAllComponentConfigurations();
53
54     /**
55      * Loads the component specified by componentName.
56      * @param componentName name of the component to load
57      * @throws ComponentNotFoundException if the component is not found
58      */

59     void loadComponent(String JavaDoc componentName)
60         throws ComponentNotFoundException;
61
62     /**
63      * Returns a table of deployment properties and their values. This interface
64      * does not specify which deployment properties are returned.
65      *
66      * @return String html table of deployment property/value pairs.
67      */

68     String JavaDoc getDeploymentProperties();
69
70
71     /**
72      * Retrieve the map of exposed deployment properties
73      *
74      * @return map of exposed deployment properties
75      */

76     Map JavaDoc getDeploymentPropertyMap();
77
78     /**
79      * Returns the value of the specified deployment property.
80      *
81      * @param propertyName name of the property to return
82      * @return String the value of the deployment property
83      */

84     String JavaDoc getDeploymentProperty(String JavaDoc propertyName);
85
86
87     /**
88      * Retrieves the free memory available to the JVM
89      * @see java.lang.Runtime#freeMemory
90      * @return the amount of free memory in the JVM
91      */

92     long getFreeMemory();
93
94     /**
95      * Retrieves the amount of memory researved by the JVM.
96      * @see java.lang.Runtime#totalMemory
97      * @return the amount of memory researved by the JVM
98      */

99     long getTotalMemory();
100
101     /**
102      * Retrieves the amount of memory the JVM may attempt to use. This will
103      * return -1 when run on a pre-1.4 JVM.
104      *
105      * @see java.lang.Runtime#maxMemory
106      * @return the amount of memory the JVM may attempt to use
107      */

108     long getMaximumMemory();
109
110     /**
111      * Retrieves the number of processes available to this JVM. This will
112      * return -1 when run on a pre-1.4 JVM.
113      *
114      * @see java.lang.Runtime#availableProcessors
115      * @return the number of processes available to this JVM
116      */

117     int getAvailableProcessors();
118
119     /**
120      * Retrieves the number of active threads in the JVM.
121      * @see java.lang.Thread#activeCount
122      * @return the number of active threads in the JVM
123      */

124     int getActiveThreadCount();
125
126     /**
127      * Retrieves the number of active thread groups in the JVM.
128      * @see java.lang.ThreadGroup#activeGroupCount
129      * @return the number of active thread groups in the JVM
130      */

131     int getActiveThreadGroupCount();
132 }
133
Popular Tags