public interface ManagementStrategy extends Service
EventNotifier
,
EventFactory
,
ManagementNamingStrategy
,
ManagementAgent
Modifier and Type | Method and Description |
---|---|
void |
addEventNotifier(EventNotifier eventNotifier)
Adds the event notifier to use.
|
EventFactory |
getEventFactory()
Gets the event factory
|
List<EventNotifier> |
getEventNotifiers()
Gets the event notifiers.
|
<T> T |
getManagedObjectName(Object managedObject,
String customName,
Class<T> nameType)
Construct an object name, where either the object to be managed and/or
a custom name component are provided
|
ManagementAgent |
getManagementAgent()
Gets the management agent
|
ManagementNamingStrategy |
getManagementNamingStrategy()
Gets the naming strategy to use
|
ManagementObjectStrategy |
getManagementObjectStrategy()
Gets the object strategy to use
|
ManagementStatisticsLevel |
getStatisticsLevel()
Deprecated.
use
ManagementAgent |
boolean |
isLoadStatisticsEnabled()
Deprecated.
use
ManagementAgent |
boolean |
isManaged(Object managedObject,
Object name)
Determines if an object or name is managed.
|
boolean |
isOnlyManageProcessorWithCustomId()
Deprecated.
use
ManagementAgent |
void |
manageNamedObject(Object managedObject,
Object preferredName)
Adds a managed object allowing the ManagementStrategy implementation
to record or expose the object as it sees fit.
|
void |
manageObject(Object managedObject)
Adds a managed object allowing the ManagementStrategy implementation to record or expose
the object as it sees fit.
|
boolean |
manageProcessor(ProcessorDefinition<?> definition)
Filter whether the processor should be managed or not.
|
void |
notify(EventObject event)
Management events provide a single model for capturing information about execution points in the
application code.
|
void |
onlyManageProcessorWithCustomId(boolean flag)
Deprecated.
use
ManagementAgent |
boolean |
removeEventNotifier(EventNotifier eventNotifier)
Removes the event notifier
|
void |
setEventFactory(EventFactory eventFactory)
Sets the event factory to use
|
void |
setEventNotifiers(List<EventNotifier> eventNotifier)
Sets the list of event notifier to use.
|
void |
setLoadStatisticsEnabled(boolean flag)
Deprecated.
use
ManagementAgent |
void |
setManagementAgent(ManagementAgent managementAgent)
Sets the management agent to use
|
void |
setManagementNamingStrategy(ManagementNamingStrategy strategy)
Sets the naming strategy to use
|
void |
setManagementObjectStrategy(ManagementObjectStrategy strategy)
Sets the object strategy to use
|
void |
setStatisticsLevel(ManagementStatisticsLevel level)
Deprecated.
use
ManagementAgent |
void |
unmanageNamedObject(Object name)
Removes a managed object by name.
|
void |
unmanageObject(Object managedObject)
Removes the managed object.
|
void manageObject(Object managedObject) throws Exception
managedObject
- the managed objectException
- can be thrown if the object could not be addedvoid manageNamedObject(Object managedObject, Object preferredName) throws Exception
managedObject
- the managed objectpreferredName
- representing the preferred name, maybe a String, or a JMX ObjectNameException
- can be thrown if the object could not be added<T> T getManagedObjectName(Object managedObject, String customName, Class<T> nameType) throws Exception
managedObject
- the object to be managedcustomName
- a custom name componentnameType
- the name type requiredException
- can be thrown if the object name could not be createdvoid unmanageObject(Object managedObject) throws Exception
managedObject
- the managed objectException
- can be thrown if the object could not be removedvoid unmanageNamedObject(Object name) throws Exception
name
- an object name previously created by this strategy.Exception
- can be thrown if the object could not be removedboolean isManaged(Object managedObject, Object name)
managedObject
- the object to considername
- the name to considervoid notify(EventObject event) throws Exception
event
- the eventException
- can be thrown if the notification failedList<EventNotifier> getEventNotifiers()
void setEventNotifiers(List<EventNotifier> eventNotifier)
eventNotifier
- list of event notifiersvoid addEventNotifier(EventNotifier eventNotifier)
Service
, as otherwise
it would not be used.eventNotifier
- event notifierboolean removeEventNotifier(EventNotifier eventNotifier)
eventNotifier
- event notifier to removeEventFactory getEventFactory()
void setEventFactory(EventFactory eventFactory)
eventFactory
- event factoryManagementNamingStrategy getManagementNamingStrategy()
void setManagementNamingStrategy(ManagementNamingStrategy strategy)
strategy
- naming strategyManagementObjectStrategy getManagementObjectStrategy()
void setManagementObjectStrategy(ManagementObjectStrategy strategy)
strategy
- object strategyManagementAgent getManagementAgent()
void setManagementAgent(ManagementAgent managementAgent)
managementAgent
- management agentboolean manageProcessor(ProcessorDefinition<?> definition)
definition
- definition of the processor@Deprecated void onlyManageProcessorWithCustomId(boolean flag)
ManagementAgent
flag
- true will only manage if custom id was set.@Deprecated boolean isOnlyManageProcessorWithCustomId()
ManagementAgent
@Deprecated void setLoadStatisticsEnabled(boolean flag)
ManagementAgent
flag
- true to enable load statistics@Deprecated boolean isLoadStatisticsEnabled()
ManagementAgent
@Deprecated void setStatisticsLevel(ManagementStatisticsLevel level)
ManagementAgent
ManagementStatisticsLevel.Default
level
- the new level@Deprecated ManagementStatisticsLevel getStatisticsLevel()
ManagementAgent
Apache Camel