public interface ManagementStrategy extends StaticService
If JMX is detected (camel-management JAR on the classpath) then org.apache.camel.management.JmxManagementStrategy is in use. Otherwise, the DefaultManagementStrategy is in use.
You can also plugin and use a 3rd party management implementation with Camel.
EventNotifier
,
EventFactory
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.
|
ManagementAgent |
getManagementAgent()
Gets the management agent
|
ManagementObjectNameStrategy |
getManagementObjectNameStrategy()
Gets the naming strategy to use
|
ManagementObjectStrategy |
getManagementObjectStrategy()
Gets the object strategy to use
|
List<EventNotifier> |
getStartedEventNotifiers()
Gets all the started event notifiers, which is ready to be used.
|
boolean |
isManaged(Object managedObject)
Determines if an object or name is managed.
|
boolean |
isManagedName(Object name)
Determines if an object or name is managed.
|
void |
manageObject(Object managedObject)
Adds a managed object allowing the ManagementStrategy implementation to record or expose the object as it sees
fit.
|
boolean |
manageProcessor(NamedNode definition)
Filter whether the processor should be managed or not.
|
void |
notify(CamelEvent event)
Management events provide a single model for capturing information about execution points in the application
code.
|
boolean |
removeEventNotifier(EventNotifier eventNotifier)
Removes the event notifier
|
void |
setEventFactory(EventFactory eventFactory)
Sets the event factory to use
|
void |
setManagementAgent(ManagementAgent managementAgent)
Sets the management agent to use
|
void |
setManagementObjectNameStrategy(ManagementObjectNameStrategy strategy)
Sets the naming strategy to use
|
void |
setManagementObjectStrategy(ManagementObjectStrategy strategy)
Sets the object strategy to use
|
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 unmanageObject(Object managedObject) throws Exception
managedObject
- the managed objectException
- can be thrown if the object could not be removedboolean isManaged(Object managedObject)
managedObject
- the object to considerboolean isManagedName(Object name)
name
- the name to considervoid notify(CamelEvent event) throws Exception
event
- the eventException
- can be thrown if the notification failedList<EventNotifier> getEventNotifiers()
List<EventNotifier> getStartedEventNotifiers()
void addEventNotifier(EventNotifier eventNotifier)
Ensure the event notifier has been started if its a 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 factoryManagementObjectNameStrategy getManagementObjectNameStrategy()
void setManagementObjectNameStrategy(ManagementObjectNameStrategy strategy)
strategy
- naming strategyManagementObjectStrategy getManagementObjectStrategy()
void setManagementObjectStrategy(ManagementObjectStrategy strategy)
strategy
- object strategyManagementAgent getManagementAgent()
void setManagementAgent(ManagementAgent managementAgent)
managementAgent
- management agentboolean manageProcessor(NamedNode definition)
Is used to filter out unwanted processors to avoid managing at too fine grained level.
definition
- definition of the processorApache Camel