|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.camel.management.DefaultManagementStrategy
public class DefaultManagementStrategy
A default management strategy that does not manage.
This is default only used if Camel detects that it cannot use the JMX capableManagedManagementStrategy
strategy. Then Camel will
fallback to use this instead that is basically a simple and noop strategy.
This class can also be used to extend your custom management implement. In fact the JMX capable
provided by Camel extends this class as well.
ManagedManagementStrategy
Constructor Summary | |
---|---|
DefaultManagementStrategy()
|
Method Summary | ||
---|---|---|
void |
addEventNotifier(EventNotifier eventNotifier)
Adds the event notifier to use. |
|
org.fusesource.commons.management.Statistic |
createStatistic(String name,
Object owner,
org.fusesource.commons.management.Statistic.UpdateMode updateMode)
|
|
CamelContext |
getCamelContext()
Get the CamelContext |
|
EventFactory |
getEventFactory()
Gets the event factory |
|
List<EventNotifier> |
getEventNotifiers()
Gets the event notifiers. |
|
|
getManagedObjectName(Object managedObject,
String customName,
Class<T> nameType)
|
|
ManagementAgent |
getManagementAgent()
Gets the management agent |
|
ManagementNamingStrategy |
getManagementNamingStrategy()
Gets the naming strategy to use |
|
ManagementStatisticsLevel |
getStatisticsLevel()
Gets the statistics level |
|
boolean |
isManaged(Object managedObject,
Object name)
|
|
boolean |
isOnlyManageProcessorWithCustomId()
Checks whether only to manage processors if they have been configured with a custom id |
|
void |
manageNamedObject(Object managedObject,
Object preferedName)
|
|
void |
manageObject(Object managedObject)
|
|
boolean |
manageProcessor(ProcessorDefinition<?> definition)
Filter whether the processor should be managed or not. |
|
void |
notify(EventObject event)
|
|
void |
onlyManageProcessorWithCustomId(boolean flag)
Sets the whether only manage processors if they have been configured with a custom id Default is false. |
|
void |
setCamelContext(CamelContext camelContext)
Injects the CamelContext |
|
void |
setEventFactory(EventFactory eventFactory)
Sets the event factory to use |
|
void |
setEventNotifiers(List<EventNotifier> eventNotifiers)
Sets the list of event notifier to use. |
|
void |
setManagementAgent(ManagementAgent managementAgent)
Sets the management agent to use |
|
void |
setManagementNamingStrategy(ManagementNamingStrategy managementNamingStrategy)
Sets the naming strategy to use |
|
void |
setStatisticsLevel(ManagementStatisticsLevel level)
Sets the statistics level Default is ManagementStatisticsLevel.All |
|
void |
start()
Starts the service |
|
void |
stop()
Stops the service |
|
void |
unmanageNamedObject(Object name)
|
|
void |
unmanageObject(Object managedObject)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultManagementStrategy()
Method Detail |
---|
public List<EventNotifier> getEventNotifiers()
ManagementStrategy
public void addEventNotifier(EventNotifier eventNotifier)
ManagementStrategy
eventNotifier
- event notifierpublic void setEventNotifiers(List<EventNotifier> eventNotifiers)
ManagementStrategy
eventNotifiers
- list of event notifierspublic EventFactory getEventFactory()
ManagementStrategy
public void setEventFactory(EventFactory eventFactory)
ManagementStrategy
eventFactory
- event factorypublic ManagementNamingStrategy getManagementNamingStrategy()
ManagementStrategy
public void setManagementNamingStrategy(ManagementNamingStrategy managementNamingStrategy)
ManagementStrategy
managementNamingStrategy
- naming strategypublic ManagementAgent getManagementAgent()
ManagementStrategy
public void setManagementAgent(ManagementAgent managementAgent)
ManagementStrategy
managementAgent
- management agentpublic void onlyManageProcessorWithCustomId(boolean flag)
ManagementStrategy
flag
- true will only manage if custom id was set.public boolean isOnlyManageProcessorWithCustomId()
ManagementStrategy
public boolean manageProcessor(ProcessorDefinition<?> definition)
ManagementStrategy
definition
- definition of the processor
public void manageObject(Object managedObject) throws Exception
manageObject
in interface org.fusesource.commons.management.ManagementStrategy
Exception
public void manageNamedObject(Object managedObject, Object preferedName) throws Exception
manageNamedObject
in interface org.fusesource.commons.management.ManagementStrategy
Exception
public <T> T getManagedObjectName(Object managedObject, String customName, Class<T> nameType) throws Exception
getManagedObjectName
in interface org.fusesource.commons.management.ManagementStrategy
Exception
public void unmanageObject(Object managedObject) throws Exception
unmanageObject
in interface org.fusesource.commons.management.ManagementStrategy
Exception
public void unmanageNamedObject(Object name) throws Exception
unmanageNamedObject
in interface org.fusesource.commons.management.ManagementStrategy
Exception
public boolean isManaged(Object managedObject, Object name)
isManaged
in interface org.fusesource.commons.management.ManagementStrategy
public CamelContext getCamelContext()
CamelContextAware
CamelContext
getCamelContext
in interface CamelContextAware
public void setCamelContext(CamelContext camelContext)
CamelContextAware
CamelContext
setCamelContext
in interface CamelContextAware
camelContext
- the Camel contextpublic void notify(EventObject event) throws Exception
notify
in interface org.fusesource.commons.management.ManagementStrategy
Exception
public org.fusesource.commons.management.Statistic createStatistic(String name, Object owner, org.fusesource.commons.management.Statistic.UpdateMode updateMode)
createStatistic
in interface org.fusesource.commons.management.ManagementStrategy
public void setStatisticsLevel(ManagementStatisticsLevel level)
ManagementStrategy
ManagementStatisticsLevel.All
level
- the new levelpublic ManagementStatisticsLevel getStatisticsLevel()
ManagementStrategy
public void start() throws Exception
Service
start
in interface Service
Exception
- is thrown if starting failedpublic void stop() throws Exception
Service
stop
in interface Service
Exception
- is thrown if stopping failed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |