|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ManagementStrategy
Strategy for management.
This is totally pluggable allowing to use a custom or 3rd party management implementation with Camel.
EventNotifier
,
EventFactory
,
ManagementNamingStrategy
,
ManagementAgent
Method Summary | ||
---|---|---|
void |
addEventNotifier(EventNotifier eventNotifier)
Adds the event notifier to use. |
|
EventFactory |
getEventFactory()
Gets the event factory |
|
List<EventNotifier> |
getEventNotifiers()
Gets the event notifiers. |
|
|
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()
Gets the statistics level |
|
boolean |
isManaged(Object managedObject,
Object name)
Determines if an object or name is managed. |
|
boolean |
isOnlyManageProcessorWithCustomId()
Checks whether only to manage processors if they have been configured with a custom id |
|
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)
Sets the whether only manage processors if they have been configured with a custom id Default is false. |
|
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 |
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)
Sets the statistics level Default is ManagementStatisticsLevel.All |
|
void |
unmanageNamedObject(Object name)
Removes a managed object by name. |
|
void |
unmanageObject(Object managedObject)
Removes the managed object. |
Methods inherited from interface org.apache.camel.Service |
---|
start, stop |
Method Detail |
---|
void manageObject(Object managedObject) throws Exception
managedObject
- the managed object
Exception
- 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 ObjectName
Exception
- 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 required
Exception
- can be thrown if the object name could not be createdvoid unmanageObject(Object managedObject) throws Exception
managedObject
- the managed object
Exception
- 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 consider
void notify(EventObject event) throws Exception
event
- the event
Exception
- 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 remove
EventFactory 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
void onlyManageProcessorWithCustomId(boolean flag)
flag
- true will only manage if custom id was set.boolean isOnlyManageProcessorWithCustomId()
void setStatisticsLevel(ManagementStatisticsLevel level)
ManagementStatisticsLevel.All
level
- the new levelManagementStatisticsLevel getStatisticsLevel()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |