org.ow2.easybeans.component.itf
Interface EZBStatisticComponent

All Superinterfaces:
EZBComponent

public interface EZBStatisticComponent
extends EZBComponent

Interface for the EasyBeans statistic component.

Author:
missonng

Nested Class Summary
static class EZBStatisticComponent.STATISTIC_FACTORY_MODE
          STATISTIC_FACTORY_MODE define how statistic factory state should be managed.
INHERIT : The statistic factory state is inherited from its parent.
MANUAL : The statistic factory state is define manually.
static class EZBStatisticComponent.STATISTIC_MODE
          STATISTIC_FACTORY_MODE define how statistic state should be managed.
AUTO : The statistic state is the result of a logic AND between its provider state and its factory state.
MANUAL : The statistic state is define manually.
static class EZBStatisticComponent.STATISTIC_PROVIDER_MODE
          STATISTIC_PROVIDER_MODE define how statistic provider state should be managed.
INHERIT : The statistic provider state is inherited from its parent.
MANUAL : The statistic provider state is define manually.
 
Method Summary
 String getStatisticDescription(String statisticId)
          Get the statistic description for the given statistic.
 List<String> getStatisticFactoryIds()
          Get registered statistic factory ids.
 EZBStatisticComponent.STATISTIC_FACTORY_MODE getStatisticFactoryMode(String statisticFactoryId)
          Get the statistic factory mode for the given statistic factory.
 boolean getStatisticFactoryState(String statisticFactoryId)
          Get the statistic factory state for the given statistic factory.
 List<String> getStatisticIds()
          Get all statistic ids.
 long getStatisticLastSampleTime(String statisticId)
          Get the statistic last sample time for the given statistic.
 EZBStatisticComponent.STATISTIC_MODE getStatisticMode(String statisticId)
          Get the statistic mode for the given statistic.
 String getStatisticName(String statisticId)
          Get the statistic name for the given statistic.
 List<String> getStatisticProviderIds()
          Get registered statistic provider ids.
 EZBStatisticComponent.STATISTIC_PROVIDER_MODE getStatisticProviderMode(String statisticProviderId)
          Get the statistic provider mode for the given statistic provider.
 boolean getStatisticProviderState(String statisticProviderId)
          Get the statistic provider state for the given statistic provider.
 long getStatisticStartTime(String statisticId)
          Get the statistic start time for the given statistic.
 boolean getStatisticState(String statisticId)
          Get the statistic state for the given statistic.
 String getStatisticValue(String statisticId)
          Get the statistic value for the given statistic.
 void importStatisticFactory(URL url)
          Import a new Statistic factory from the given URL.
The factory is downloaded, then compiled, then instanciated and finally registered in the component.
 void registerJ2EEManagedObject(EZBJ2EEManagedObject object)
          Register a new J2EE managed object.
If a J2EE managed object with the same id is already registered, it will be unregistered first.
 void registerStatisticFactory(EZBStatisticFactory statisticFactory)
          Register a new statistic factory.
If a statistic factory with the same id is already registered, it will be unregistered first.
 void resetStatistic(String statisticId)
          Reset the given statistic.
 void setStatisticFactoryMode(String statisticFactoryId, EZBStatisticComponent.STATISTIC_FACTORY_MODE statisticFactoryMode)
          Set the statistic factory mode for the given statistic factory.
 void setStatisticFactoryState(String statisticFactoryId, boolean statisticFactoryState)
          Set the statistic factory state for the given statistic factory.
The statistic factory mode is automatically set to MANUAL.
 void setStatisticMode(String statisticId, EZBStatisticComponent.STATISTIC_MODE statisticMode)
          Set the statistic mode for the given statistic.
 void setStatisticProviderMode(String statisticProviderId, EZBStatisticComponent.STATISTIC_PROVIDER_MODE statisticProviderMode)
          Set the statistic provider mode for the given statistic provider.
 void setStatisticProviderState(String statisticProviderId, boolean statisticProviderState)
          Set the statistic provider state for the given statistic provider.
The statistic provider mode is automatically set to MANUAL.
 void setStatisticState(String statisticId, boolean statisticStateValue)
          Set the statistic state for the given statistic.
The statistic mode is automatically set to MANUAL.
 void unregisterJ2EEManagedObject(EZBJ2EEManagedObject object)
          Unregister a J2EE managed object.
 void unregisterStatisticFactory(EZBStatisticFactory statisticFactory)
          Unregister a statistic factory.
 
Methods inherited from interface org.ow2.easybeans.component.api.EZBComponent
init, start, stop
 

Method Detail

registerStatisticFactory

void registerStatisticFactory(EZBStatisticFactory statisticFactory)
Register a new statistic factory.
If a statistic factory with the same id is already registered, it will be unregistered first.

Parameters:
statisticFactory - The statistic factory to register.

unregisterStatisticFactory

void unregisterStatisticFactory(EZBStatisticFactory statisticFactory)
Unregister a statistic factory.

Parameters:
statisticFactory - The statistic factory to unregister.

registerJ2EEManagedObject

void registerJ2EEManagedObject(EZBJ2EEManagedObject object)
Register a new J2EE managed object.
If a J2EE managed object with the same id is already registered, it will be unregistered first.

Parameters:
object - The J2EE managed object to register.

unregisterJ2EEManagedObject

void unregisterJ2EEManagedObject(EZBJ2EEManagedObject object)
Unregister a J2EE managed object.

Parameters:
object - The J2EE managed object to unregister.

importStatisticFactory

void importStatisticFactory(URL url)
                            throws EZBComponentException
Import a new Statistic factory from the given URL.
The factory is downloaded, then compiled, then instanciated and finally registered in the component.

Parameters:
url - The file to download.
Throws:
EZBComponentException - If an error occurs while downloading, compiling, instanciating, or registering the factory.

getStatisticFactoryIds

List<String> getStatisticFactoryIds()
                                    throws EZBComponentException
Get registered statistic factory ids.

Returns:
The statistic factory ids.
Throws:
EZBComponentException - If an error occurs.

getStatisticFactoryMode

EZBStatisticComponent.STATISTIC_FACTORY_MODE getStatisticFactoryMode(String statisticFactoryId)
                                                                     throws EZBComponentException
Get the statistic factory mode for the given statistic factory.

Parameters:
statisticFactoryId - The statistic factory id.
Returns:
The statistic factory mode.
Throws:
EZBComponentException - If an error occurs.

setStatisticFactoryMode

void setStatisticFactoryMode(String statisticFactoryId,
                             EZBStatisticComponent.STATISTIC_FACTORY_MODE statisticFactoryMode)
                             throws EZBComponentException
Set the statistic factory mode for the given statistic factory.

Parameters:
statisticFactoryId - The statistic factory id.
statisticFactoryMode - The statistic factory mode.
Throws:
EZBComponentException - If an error occurs.

getStatisticFactoryState

boolean getStatisticFactoryState(String statisticFactoryId)
                                 throws EZBComponentException
Get the statistic factory state for the given statistic factory.

Parameters:
statisticFactoryId - The statistic factory id.
Returns:
The statistic factory state.
Throws:
EZBComponentException - If an error occurs.

setStatisticFactoryState

void setStatisticFactoryState(String statisticFactoryId,
                              boolean statisticFactoryState)
                              throws EZBComponentException
Set the statistic factory state for the given statistic factory.
The statistic factory mode is automatically set to MANUAL.

Parameters:
statisticFactoryId - The statistic factory id.
statisticFactoryState - The statistic factory state
Throws:
EZBComponentException - If an error occurs.

getStatisticProviderIds

List<String> getStatisticProviderIds()
                                     throws EZBComponentException
Get registered statistic provider ids.

Returns:
The statistic provider ids.
Throws:
EZBComponentException - If an error occurs.

getStatisticProviderMode

EZBStatisticComponent.STATISTIC_PROVIDER_MODE getStatisticProviderMode(String statisticProviderId)
                                                                       throws EZBComponentException
Get the statistic provider mode for the given statistic provider.

Parameters:
statisticProviderId - The statistic provider id.
Returns:
The statistic provider mode.
Throws:
EZBComponentException - If an error occurs.

setStatisticProviderMode

void setStatisticProviderMode(String statisticProviderId,
                              EZBStatisticComponent.STATISTIC_PROVIDER_MODE statisticProviderMode)
                              throws EZBComponentException
Set the statistic provider mode for the given statistic provider.

Parameters:
statisticProviderId - The statistic provider id.
statisticProviderMode - The statistic provider mode.
Throws:
EZBComponentException - If an error occurs.

getStatisticProviderState

boolean getStatisticProviderState(String statisticProviderId)
                                  throws EZBComponentException
Get the statistic provider state for the given statistic provider.

Parameters:
statisticProviderId - The statistic provider id.
Returns:
The statistic provider state.
Throws:
EZBComponentException - If an error occurs.

setStatisticProviderState

void setStatisticProviderState(String statisticProviderId,
                               boolean statisticProviderState)
                               throws EZBComponentException
Set the statistic provider state for the given statistic provider.
The statistic provider mode is automatically set to MANUAL.

Parameters:
statisticProviderId - The statistic provider id.
statisticProviderState - The statistic provider state.
Throws:
EZBComponentException - If an error occurs.

getStatisticIds

List<String> getStatisticIds()
                             throws EZBComponentException
Get all statistic ids.

Returns:
The statistic ids.
Throws:
EZBComponentException - If an error occurs.

getStatisticMode

EZBStatisticComponent.STATISTIC_MODE getStatisticMode(String statisticId)
                                                      throws EZBComponentException
Get the statistic mode for the given statistic.

Parameters:
statisticId - The statistic id.
Returns:
The statistic mode.
Throws:
EZBComponentException - If an error occurs.

setStatisticMode

void setStatisticMode(String statisticId,
                      EZBStatisticComponent.STATISTIC_MODE statisticMode)
                      throws EZBComponentException
Set the statistic mode for the given statistic.

Parameters:
statisticId - The statistic id.
statisticMode - The statistic mode.
Throws:
EZBComponentException - If an error occurs.

getStatisticState

boolean getStatisticState(String statisticId)
                          throws EZBComponentException
Get the statistic state for the given statistic.

Parameters:
statisticId - The statistic id.
Returns:
The statistic state.
Throws:
EZBComponentException - If an error occurs.

setStatisticState

void setStatisticState(String statisticId,
                       boolean statisticStateValue)
                       throws EZBComponentException
Set the statistic state for the given statistic.
The statistic mode is automatically set to MANUAL.

Parameters:
statisticId - The statistic id.
statisticStateValue - The statistic state.
Throws:
EZBComponentException - If an error occurs.

resetStatistic

void resetStatistic(String statisticId)
                    throws EZBComponentException
Reset the given statistic.

Parameters:
statisticId - The statistic id to reset.
Throws:
EZBComponentException - If an error occurs.

getStatisticName

String getStatisticName(String statisticId)
                        throws EZBComponentException
Get the statistic name for the given statistic.

Parameters:
statisticId - The statistic id.
Returns:
The statistic name.
Throws:
EZBComponentException - If an error occurs.

getStatisticDescription

String getStatisticDescription(String statisticId)
                               throws EZBComponentException
Get the statistic description for the given statistic.

Parameters:
statisticId - The statistic id.
Returns:
The statistic description.
Throws:
EZBComponentException - If an error occurs.

getStatisticValue

String getStatisticValue(String statisticId)
                         throws EZBComponentException
Get the statistic value for the given statistic.

Parameters:
statisticId - The statistic id.
Returns:
The statistic value.
Throws:
EZBComponentException - If an error occurs.

getStatisticStartTime

long getStatisticStartTime(String statisticId)
                           throws EZBComponentException
Get the statistic start time for the given statistic.

Parameters:
statisticId - The statistic id.
Returns:
The statistic start time.
Throws:
EZBComponentException - If an error occurs.

getStatisticLastSampleTime

long getStatisticLastSampleTime(String statisticId)
                                throws EZBComponentException
Get the statistic last sample time for the given statistic.

Parameters:
statisticId - The statistic id.
Returns:
The statistic last sample time.
Throws:
EZBComponentException - If an error occurs.


Copyright © 2006-2012 OW2 Consortium. All Rights Reserved.