Package org.apache.camel.management.mbean

Examples of org.apache.camel.management.mbean.ManagedCamelContext


*
*/
public class DefaultManagementObjectStrategy implements ManagementObjectStrategy {

    public Object getManagedObjectForCamelContext(CamelContext context) {
        ManagedCamelContext mc = new ManagedCamelContext((ModelCamelContext)context);
        mc.init(context.getManagementStrategy());
        return mc;
    }
View Full Code Here


    public void onContextStart(CamelContext context) {
        try {
            initialized = true;

            ManagedCamelContext mc = new ManagedCamelContext(context);
            mc.init(context.getManagementStrategy());
            getManagementStrategy().manageObject(mc);

        } catch (Exception e) {
            // must rethrow to allow CamelContext fallback to non JMX agent to allow
            // Camel to continue to run
View Full Code Here

        // the agent hasn't been started
        if (!initialized) {
            return;
        }
        try {
            ManagedCamelContext mc = new ManagedCamelContext(context);
            mc.init(context.getManagementStrategy());
            // the context could have been removed already
            if (getManagementStrategy().isManaged(mc, null)) {
                getManagementStrategy().unmanageObject(mc);
            }
        } catch (Exception e) {
View Full Code Here

        }

        ObjectName objectName = null;

        if (managedObject instanceof ManagedCamelContext) {
            ManagedCamelContext mcc = (ManagedCamelContext) managedObject;
            objectName = getManagementNamingStrategy().getObjectNameForCamelContext(mcc.getContext());
        } else if (managedObject instanceof ManagedComponent) {
            ManagedComponent mc = (ManagedComponent) managedObject;
            objectName = getManagementNamingStrategy().getObjectNameForComponent(mc.getComponent(), mc.getComponentName());
        } else if (managedObject instanceof ManagedEndpoint) {
            ManagedEndpoint me = (ManagedEndpoint) managedObject;
View Full Code Here

    public void onContextStart(CamelContext context) {
        try {
            initialized = true;

            ManagedCamelContext mc = new ManagedCamelContext(context);
            mc.init(context.getManagementStrategy());
            getManagementStrategy().manageObject(mc);

        } catch (Exception e) {
            // must rethrow to allow CamelContext fallback to non JMX agent to allow
            // Camel to continue to run
View Full Code Here

        // the agent hasn't been started
        if (!initialized) {
            return;
        }
        try {
            ManagedCamelContext mc = new ManagedCamelContext(context);
            mc.init(context.getManagementStrategy());
            // the context could have been removed already
            if (getManagementStrategy().isManaged(mc, null)) {
                getManagementStrategy().unmanageObject(mc);
            }
        } catch (Exception e) {
View Full Code Here

*
*/
public class DefaultManagementObjectStrategy implements ManagementObjectStrategy {

    public Object getManagedObjectForCamelContext(CamelContext context) {
        ManagedCamelContext mc = new ManagedCamelContext(context);
        mc.init(context.getManagementStrategy());
        return mc;
    }
View Full Code Here

    public void setCamelContext(CamelContext camelContext) {
        this.camelContext = camelContext;
    }

    public void onContextStart(CamelContext context) throws VetoCamelContextStartException {
        ManagedCamelContext mc = new ManagedCamelContext(context);
        mc.init(context.getManagementStrategy());

        String managementName = context.getManagementName() != null ? context.getManagementName() : context.getName();

        try {
            boolean done = false;
View Full Code Here

        // the agent hasn't been started
        if (!initialized) {
            return;
        }
        try {
            ManagedCamelContext mc = new ManagedCamelContext(context);
            mc.init(context.getManagementStrategy());
            // the context could have been removed already
            if (getManagementStrategy().isManaged(mc, null)) {
                getManagementStrategy().unmanageObject(mc);
            }
        } catch (Exception e) {
View Full Code Here

    public void onContextStart(CamelContext context) {
        try {
            initialized = true;

            ManagedCamelContext mc = new ManagedCamelContext(context);
            mc.init(context.getManagementStrategy());
            getManagementStrategy().manageObject(mc);

        } catch (Exception e) {
            // must rethrow to allow CamelContext fallback to non JMX agent to allow
            // Camel to continue to run
View Full Code Here

TOP

Related Classes of org.apache.camel.management.mbean.ManagedCamelContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.