org.apache.camel.management
Class DefaultManagementStrategy

java.lang.Object
  extended by org.apache.camel.management.DefaultManagementStrategy
All Implemented Interfaces:
Service, org.fusesource.commons.management.ManagementStrategy
Direct Known Subclasses:
ManagedManagementStrategy

public class DefaultManagementStrategy
extends Object
implements ManagementStrategy

A default management strategy that does not manage.

This is default only used if Camel detects that it cannot use the JMX capable ManagedManagementStrategy 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.

Version:
$Revision: 898746 $
See Also:
ManagedManagementStrategy

Constructor Summary
DefaultManagementStrategy()
           
 
Method Summary
 void addEventNotifier(EventNotifier eventNotifier)
           
 org.fusesource.commons.management.Statistic createStatistic(String name, Object owner, org.fusesource.commons.management.Statistic.UpdateMode updateMode)
           
 EventFactory getEventFactory()
           
 List<EventNotifier> getEventNotifiers()
           
<T> T
getManagedObjectName(Object managedObject, String customName, Class<T> nameType)
           
 ManagementAgent getManagementAgent()
           
 ManagementNamingStrategy getManagementNamingStrategy()
           
 ManagementStatisticsLevel getStatisticsLevel()
           
 boolean isManaged(Object managedObject, Object name)
           
 boolean isOnlyManageProcessorWithCustomId()
           
 void manageNamedObject(Object managedObject, Object preferedName)
           
 void manageObject(Object managedObject)
           
 boolean manageProcessor(ProcessorDefinition<?> definition)
           
 void notify(EventObject event)
           
 void onlyManageProcessorWithCustomId(boolean flag)
           
 void setEventFactory(EventFactory eventFactory)
           
 void setEventNotifiers(List<EventNotifier> eventNotifiers)
           
 void setManagementAgent(ManagementAgent managementAgent)
           
 void setManagementNamingStrategy(ManagementNamingStrategy managementNamingStrategy)
           
 void setStatisticsLevel(ManagementStatisticsLevel level)
           
 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

DefaultManagementStrategy

public DefaultManagementStrategy()
Method Detail

getEventNotifiers

public List<EventNotifier> getEventNotifiers()

addEventNotifier

public void addEventNotifier(EventNotifier eventNotifier)

setEventNotifiers

public void setEventNotifiers(List<EventNotifier> eventNotifiers)

getEventFactory

public EventFactory getEventFactory()

setEventFactory

public void setEventFactory(EventFactory eventFactory)

getManagementNamingStrategy

public ManagementNamingStrategy getManagementNamingStrategy()

setManagementNamingStrategy

public void setManagementNamingStrategy(ManagementNamingStrategy managementNamingStrategy)

getManagementAgent

public ManagementAgent getManagementAgent()

setManagementAgent

public void setManagementAgent(ManagementAgent managementAgent)

onlyManageProcessorWithCustomId

public void onlyManageProcessorWithCustomId(boolean flag)

isOnlyManageProcessorWithCustomId

public boolean isOnlyManageProcessorWithCustomId()

manageProcessor

public boolean manageProcessor(ProcessorDefinition<?> definition)

manageObject

public void manageObject(Object managedObject)
                  throws Exception
Specified by:
manageObject in interface org.fusesource.commons.management.ManagementStrategy
Throws:
Exception

manageNamedObject

public void manageNamedObject(Object managedObject,
                              Object preferedName)
                       throws Exception
Specified by:
manageNamedObject in interface org.fusesource.commons.management.ManagementStrategy
Throws:
Exception

getManagedObjectName

public <T> T getManagedObjectName(Object managedObject,
                                  String customName,
                                  Class<T> nameType)
                       throws Exception
Specified by:
getManagedObjectName in interface org.fusesource.commons.management.ManagementStrategy
Throws:
Exception

unmanageObject

public void unmanageObject(Object managedObject)
                    throws Exception
Specified by:
unmanageObject in interface org.fusesource.commons.management.ManagementStrategy
Throws:
Exception

unmanageNamedObject

public void unmanageNamedObject(Object name)
                         throws Exception
Specified by:
unmanageNamedObject in interface org.fusesource.commons.management.ManagementStrategy
Throws:
Exception

isManaged

public boolean isManaged(Object managedObject,
                         Object name)
Specified by:
isManaged in interface org.fusesource.commons.management.ManagementStrategy

notify

public void notify(EventObject event)
            throws Exception
Specified by:
notify in interface org.fusesource.commons.management.ManagementStrategy
Throws:
Exception

createStatistic

public org.fusesource.commons.management.Statistic createStatistic(String name,
                                                                   Object owner,
                                                                   org.fusesource.commons.management.Statistic.UpdateMode updateMode)
Specified by:
createStatistic in interface org.fusesource.commons.management.ManagementStrategy

setStatisticsLevel

public void setStatisticsLevel(ManagementStatisticsLevel level)

getStatisticsLevel

public ManagementStatisticsLevel getStatisticsLevel()

start

public void start()
           throws Exception
Description copied from interface: Service
Starts the service

Specified by:
start in interface Service
Throws:
Exception - is thrown if starting failed

stop

public void stop()
          throws Exception
Description copied from interface: Service
Stops the service

Specified by:
stop in interface Service
Throws:
Exception - is thrown if stopping failed


Copyright © 2007-2010 The Apache Software Foundation. All Rights Reserved.