org.sape.carbon.services.carbonmanagement
Interface CarbonManagementService

All Superinterfaces:
FunctionalInterface
All Known Implementing Classes:
DefaultCarbonManagementServiceImpl

public interface CarbonManagementService
extends FunctionalInterface

This services exposes methods that are helpful in managing aspects of the Carbon core services of Configuration, Components, and DeploymentProperties. Copyright 2002 Sapient

Since:
carbon 1.2
Version:
$Revision: 1.5 $($Author: jreed $ / $Date: 2003/04/15 18:53:53 $)
Author:
Douglas Voet, Dec 19, 2002

Method Summary
 int getActiveThreadCount()
          Retrieves the number of active threads in the JVM.
 int getActiveThreadGroupCount()
          Retrieves the number of active thread groups in the JVM.
 int getAvailableProcessors()
          Retrieves the number of processes available to this JVM.
 String getDeploymentProperties()
          Returns a table of deployment properties and their values.
 String getDeploymentProperty(String propertyName)
          Returns the value of the specified deployment property.
 Map getDeploymentPropertyMap()
          Retrieve the map of exposed deployment properties
 long getFreeMemory()
          Retrieves the free memory available to the JVM
 long getMaximumMemory()
          Retrieves the amount of memory the JVM may attempt to use.
 long getTotalMemory()
          Retrieves the amount of memory researved by the JVM.
 void loadComponent(String componentName)
          Loads the component specified by componentName.
 void refreshAllComponentConfigurations()
          Refreshes all the components loaded in the system.
 void refreshAllConfigurations()
          Refreshes all configurations loaded in the system.
 void refreshConfiguration(String configurationPath)
          Refreshes the configuration identified by configurationPath
 String viewConfigurationTree()
          Returns the entire configuration hierachy in a tree view
 String viewConfigurationXML(String configurationPath)
          Returns the configuration named by configurationPath as an XML String.
 

Method Detail

viewConfigurationXML

public String viewConfigurationXML(String configurationPath)
                            throws ConfigurationNotFoundException
Returns the configuration named by configurationPath as an XML String.

Parameters:
configurationPath - name of the configuration to view
Returns:
String XML representation of configuration named by configurationPath
Throws:
ConfigurationNotFoundException - if configurationPath is not found

viewConfigurationTree

public String viewConfigurationTree()
Returns the entire configuration hierachy in a tree view

Returns:
String tree view of the configuration hierachy

refreshAllConfigurations

public void refreshAllConfigurations()
Refreshes all configurations loaded in the system.


refreshConfiguration

public void refreshConfiguration(String configurationPath)
                          throws ConfigurationNotFoundException
Refreshes the configuration identified by configurationPath

Parameters:
configurationPath - name of the configuration to refresh
Throws:
ConfigurationNotFoundException - if configurationPath is not found

refreshAllComponentConfigurations

public void refreshAllComponentConfigurations()
Refreshes all the components loaded in the system.


loadComponent

public void loadComponent(String componentName)
                   throws ComponentNotFoundException
Loads the component specified by componentName.

Parameters:
componentName - name of the component to load
Throws:
ComponentNotFoundException - if the component is not found

getDeploymentProperties

public String getDeploymentProperties()
Returns a table of deployment properties and their values. This interface does not specify which deployment properties are returned.

Returns:
String html table of deployment property/value pairs.

getDeploymentPropertyMap

public Map getDeploymentPropertyMap()
Retrieve the map of exposed deployment properties

Returns:
map of exposed deployment properties

getDeploymentProperty

public String getDeploymentProperty(String propertyName)
Returns the value of the specified deployment property.

Parameters:
propertyName - name of the property to return
Returns:
String the value of the deployment property

getFreeMemory

public long getFreeMemory()
Retrieves the free memory available to the JVM

Returns:
the amount of free memory in the JVM
See Also:
Runtime.freeMemory()

getTotalMemory

public long getTotalMemory()
Retrieves the amount of memory researved by the JVM.

Returns:
the amount of memory researved by the JVM
See Also:
Runtime.totalMemory()

getMaximumMemory

public long getMaximumMemory()
Retrieves the amount of memory the JVM may attempt to use. This will return -1 when run on a pre-1.4 JVM.

Returns:
the amount of memory the JVM may attempt to use
See Also:
Runtime.maxMemory()

getAvailableProcessors

public int getAvailableProcessors()
Retrieves the number of processes available to this JVM. This will return -1 when run on a pre-1.4 JVM.

Returns:
the number of processes available to this JVM
See Also:
Runtime.availableProcessors()

getActiveThreadCount

public int getActiveThreadCount()
Retrieves the number of active threads in the JVM.

Returns:
the number of active threads in the JVM
See Also:
Thread.activeCount()

getActiveThreadGroupCount

public int getActiveThreadGroupCount()
Retrieves the number of active thread groups in the JVM.

Returns:
the number of active thread groups in the JVM
See Also:
ThreadGroup.activeGroupCount()


Copyright 1999-2003 Sapient Corporation. All Rights Reserved.