public interface IManagedComponent
Modifier and Type | Method and Description |
---|---|
void |
addLegacyPropertyProvider(java.lang.String prefix,
ILegacySettingProvider legacyPropertyProvider)
Registers a legacy property provider for a given legacy property prefix.
|
<T extends ICounter> |
createPerformanceCounter(java.lang.String name,
ILocalizableString description,
CounterFactory<T> counterTypeFactory)
Creates a performance counter of a given type, with a given name and description.
|
<T extends ICounter> |
createPerformanceCounter(java.lang.String name,
java.lang.String description,
CounterFactory<T> counterTypeFactory)
Deprecated.
since C2. Use the localizable createPerformanceCounter instead
|
void |
createPropertyBasedValueCounter(java.lang.String name,
ILocalizableString description,
java.beans.PropertyDescriptor propertyDescr,
java.lang.Object sourceObject)
Creates a property based value counter with a given name.
|
void |
createPropertyBasedValueCounter(java.lang.String name,
ILocalizableString description,
java.lang.String propertyName,
java.lang.Object sourceObject)
Creates a property based value counter with a given name.
|
void |
createPropertyBasedValueCounter(java.lang.String name,
java.lang.String description,
java.beans.PropertyDescriptor propertyDescr,
java.lang.Object sourceObject)
Deprecated.
since C2. Use the localizable createPropertyBasedValueCounter instead
|
void |
createPropertyBasedValueCounter(java.lang.String name,
java.lang.String description,
java.lang.String propertyName,
java.lang.Object sourceObject)
Deprecated.
since C2. Use the localizable createPropertyBasedValueCounter instead
|
ISettingsCollection |
createSettingsCollection(ISettingsPersistenceHandler persistenceHandler)
Creates a default settings collection given the specified settings persistence handler.
|
ISettingsCollection |
createSettingsCollection(java.lang.String name,
ISettingsPersistenceHandler persistenceHandler)
Creates a named settings collection given the specified settings persistence handler.
|
IManagedComponent |
createSubComponent(java.lang.String type,
java.lang.String name,
ILocalizableString description,
java.lang.Object componentImpl)
Creates a nested sub-component inside this component.
|
IManagedComponent |
createSubComponent(java.lang.String type,
java.lang.String name,
java.lang.String description,
java.lang.Object componentImpl)
Deprecated.
since C2. Use the localizable createSubComponent instead
|
IAlertDefinition |
defineAlert(AlertLevel level,
IStringResource message,
IStringResource description)
Defines an alert that can be issued by this managed component.
|
void |
defineInfoAttribute(java.lang.String name,
ILocalizableString description,
java.beans.PropertyDescriptor propertyDescr,
java.lang.Object sourceObject)
Defines an informational attribute of a managed component, based on a property of a class or object.
|
void |
defineInfoAttribute(java.lang.String name,
ILocalizableString description,
java.lang.String propertyName,
java.lang.Object sourceObject)
Defines an informational attribute of a managed component, based on a property of a class or object.
|
void |
defineOperation(java.lang.String name,
ILocalizableString description,
java.lang.String methodName,
java.lang.Object targetObject,
OperationImpact impact,
IParameterDefinition<?>... parameters)
Defines an operation with a given name, description and parameters, based on a given method name.
|
void |
defineOperation(java.lang.String name,
java.lang.String description,
java.lang.String methodName,
java.lang.Object targetObject,
IParameterDefinition<?>[] parameters,
OperationImpact impact)
Deprecated.
since C2. Use the localizable defineOperation method instead.
|
IProblemDefinition |
defineProblem(IStringResource problemRaiseAlertMessage,
IStringResource problemRaiseAlertDescription,
IStringResource problemClearAlertMessage,
IStringResource problemClearAlertDescription)
Defines an problem that can be raised by this managed component.
|
java.lang.Object |
getComponentImpl()
Retrieves the actual component implementation.
|
java.util.Collection<ICounter> |
getCounters(java.lang.String counterName)
Retrieves the counter(s) with the given name.
|
java.lang.String |
getFullName()
Returns the full component name, that's the name of this component prefixed by the names of its parent components,
separated by '/'.
|
java.lang.String |
getName()
Returns the component name.
|
IManagedComponent |
getParent()
Returns the parent managed component of this component.
|
ISettingsCollection |
getSettingsCollection()
Returns the default settings collection
|
ISettingsCollection |
getSettingsCollection(java.lang.String name)
Returns a named settings collection.
|
java.lang.Object |
getSettingValue(java.lang.String name)
Returns the value of a setting denoted by the given name.
|
java.util.Collection<IManagedComponent> |
getSubComponents()
Returns an iterator on the set of sub-components of this component.
|
java.util.Collection<IManagedComponent> |
getSubComponents(java.lang.String name)
Return the sub-components with the given name.
|
void |
registerComponentTree()
Registers the component tree to make it available for management tools.
|
void |
unregisterComponentTree()
Unregisters the component tree, causing all necessary cleanup actions to be performed.
|
@Deprecated <T extends ICounter> T createPerformanceCounter(java.lang.String name, java.lang.String description, CounterFactory<T> counterTypeFactory)
name
- the name of the new counterdescription
- cannot be a null or empty string.counterTypeFactory
- The factory for the required counter type<T extends ICounter> T createPerformanceCounter(java.lang.String name, ILocalizableString description, CounterFactory<T> counterTypeFactory)
name
- the name of the new counterdescription
- The localizable description of the new counter (cannot be a null).counterTypeFactory
- The factory for the required counter type@Deprecated void createPropertyBasedValueCounter(java.lang.String name, java.lang.String description, java.beans.PropertyDescriptor propertyDescr, java.lang.Object sourceObject)
name
- The name of the new counterdescription
- cannot be a null or empty string.propertyDescr
- The descriptor of the property supplying the counter valuesourceObject
- The source object on which to invoke the getter method. This parameter
can a class when the getter method is static. When null, the managed
component is used as source object.void createPropertyBasedValueCounter(java.lang.String name, ILocalizableString description, java.beans.PropertyDescriptor propertyDescr, java.lang.Object sourceObject)
name
- The name of the new counterdescription
- The localizable description of the new counter (cannot be a null).propertyDescr
- The descriptor of the property supplying the counter valuesourceObject
- The source object on which to invoke the getter method. This parameter
can a class when the getter method is static. When null, the managed
component is used as source object.@Deprecated void createPropertyBasedValueCounter(java.lang.String name, java.lang.String description, java.lang.String propertyName, java.lang.Object sourceObject)
name
- The name of the new counterdescription
- cannot be a null or empty string.propertyName
- The name of the property supplying the counter valuesourceObject
- The source object on which to invoke the getter method.
In case of a static property, this should be the class.void createPropertyBasedValueCounter(java.lang.String name, ILocalizableString description, java.lang.String propertyName, java.lang.Object sourceObject)
name
- The name of the new counterdescription
- The localizable description of the new counter (cannot be a null).propertyName
- The name of the property supplying the counter valuesourceObject
- The source object on which to invoke the getter method.
In case of a static property, this should be the class.ISettingsCollection createSettingsCollection(ISettingsPersistenceHandler persistenceHandler)
persistenceHandler
- the persistence handler for this default settings collection.ISettingsCollection createSettingsCollection(java.lang.String name, ISettingsPersistenceHandler persistenceHandler)
name
- the name of the settings collection to be created.persistenceHandler
- the persistence handler for this default settings collection.@Deprecated IManagedComponent createSubComponent(java.lang.String type, java.lang.String name, java.lang.String description, java.lang.Object componentImpl)
type
- The type of sub-component. E.g. dbConnectionPool, soapConnector, ldapCache, etc.name
- The name of the sub-component.description
- The description of the sub-componentcomponentImpl
- The object actually implementing the sub-componentIManagedComponent createSubComponent(java.lang.String type, java.lang.String name, ILocalizableString description, java.lang.Object componentImpl)
type
- The type of sub-component. E.g. dbConnectionPool, soapConnector, ldapCache, etc.name
- The name of the sub-component.description
- The localizable description of the new sub-component (cannot be a null).componentImpl
- The object actually implementing the sub-componentjava.lang.Object getComponentImpl()
java.lang.String getName()
java.lang.String getFullName()
IManagedComponent getParent()
ISettingsCollection getSettingsCollection()
ISettingsCollection getSettingsCollection(java.lang.String name)
name
- the name of the settings collection to be returned.java.lang.Object getSettingValue(java.lang.String name)
name
- the name of the setting whose value is to be retrievedvoid addLegacyPropertyProvider(java.lang.String prefix, ILegacySettingProvider legacyPropertyProvider)
prefix
- The legacy property prefix.legacyPropertyProvider
- The legacy property provider.void registerComponentTree()
void unregisterComponentTree()
java.util.Collection<IManagedComponent> getSubComponents()
java.util.Collection<IManagedComponent> getSubComponents(java.lang.String name)
name
- the full name of the sub-component to retrieve; pass '*' to get all direct
and indirect sub-compponentsjava.util.Collection<ICounter> getCounters(java.lang.String counterName)
counterName
- the name of the counter to retrieve. Pass '*' to reset all counters.@Deprecated void defineOperation(java.lang.String name, java.lang.String description, java.lang.String methodName, java.lang.Object targetObject, IParameterDefinition<?>[] parameters, OperationImpact impact)
name
- The name of the new operationdescription
- cannot be a null or empty string.methodName
- The name of the method implementing this operationtargetObject
- The object on which to invoke the operation method. This parameter
can be a class when the method is static. When null, the managed
component is used as target object.parameters
- The set of parameters of the new operationimpact
- The impact of the operation.void defineOperation(java.lang.String name, ILocalizableString description, java.lang.String methodName, java.lang.Object targetObject, OperationImpact impact, IParameterDefinition<?>... parameters)
name
- The name of the new operationdescription
- The localizable description of the new operation (cannot be a null).methodName
- The name of the method implementing this operationtargetObject
- The object on which to invoke the operation method. This parameter
can be a class when the method is static. When null, the managed
component is used as target object.impact
- The impact of the operation.parameters
- The set of parameters of the new operationIAlertDefinition defineAlert(AlertLevel level, IStringResource message, IStringResource description)
level
- The level of the alert.message
- The localizable string of the alert messagedescription
- The localizable string of the alert descriptionIProblemDefinition defineProblem(IStringResource problemRaiseAlertMessage, IStringResource problemRaiseAlertDescription, IStringResource problemClearAlertMessage, IStringResource problemClearAlertDescription)
problemRaiseAlertMessage
- The localizable string of the alert message that's issued when raising the problemproblemRaiseAlertDescription
- The localizable string of the alert description that's issued when raising the problemproblemClearAlertMessage
- The localizable string of the alert message that's issued when clearing the problemproblemClearAlertDescription
- The localizable string of the alert description that's issued when clearing the problemvoid defineInfoAttribute(java.lang.String name, ILocalizableString description, java.beans.PropertyDescriptor propertyDescr, java.lang.Object sourceObject)
name
- The name of the new informational attributedescription
- The localizable description of the informational attribute (cannot be a null).propertyDescr
- The descriptor of the property supplying the value for the informational attribute
The source object on which to invoke the getter method. This parameter can be null when the getter
method is static.sourceObject
- The source object on which to invoke the getter method.
In case of a static property, this should be the class.void defineInfoAttribute(java.lang.String name, ILocalizableString description, java.lang.String propertyName, java.lang.Object sourceObject)
name
- The name of the new informational attributedescription
- The localizable description of the informational attribute (cannot be a null).propertyName
- The name of the property supplying the value for the informational attributesourceObject
- The source object on which to invoke the getter method.
In case of a static property, this should be the class.