Interface ManagementAgent

    • Method Detail

      • register

        void register​(Object obj,
                      ObjectName name)
               throws JMException
        Registers object with management infrastructure with a specific name. Object must be annotated or implement standard MBean interface.
        Parameters:
        obj - the object to register
        name - the name
        Throws:
        JMException - is thrown if the registration failed
      • register

        void register​(Object obj,
                      ObjectName name,
                      boolean forceRegistration)
               throws JMException
        Registers object with management infrastructure with a specific name. Object must be annotated or implement standard MBean interface.
        Parameters:
        obj - the object to register
        name - the name
        forceRegistration - if set to true, then object will be registered despite existing object is already registered with the name.
        Throws:
        JMException - is thrown if the registration failed
      • unregister

        void unregister​(ObjectName name)
                 throws JMException
        Unregisters object based upon registered name
        Parameters:
        name - the name
        Throws:
        JMException - is thrown if the unregistration failed
      • isRegistered

        boolean isRegistered​(ObjectName name)
        Is the given object registered
        Parameters:
        name - the name
        Returns:
        true if registered
      • newProxyClient

        <T> T newProxyClient​(ObjectName name,
                             Class<T> mbean)
        Creates a new proxy client
        Parameters:
        name - the mbean name
        mbean - the client interface, such as from the org.apache.camel.api.management.mbean package.
        Returns:
        the client or null if mbean does not exists
      • getMBeanServer

        MBeanServer getMBeanServer()
        Get the MBeanServer which hosts managed objects.

        Notice: If the JMXEnabled configuration is not set to true, this method will return null.

        Returns:
        the MBeanServer
      • setMBeanServer

        void setMBeanServer​(MBeanServer mbeanServer)
        Sets a custom mbean server to use
        Parameters:
        mbeanServer - the custom mbean server
      • getMBeanObjectDomainName

        String getMBeanObjectDomainName()
        Get domain name for Camel MBeans.

        Notice: That this can be different that the default domain name of the MBean Server.

        Returns:
        domain name
      • setMBeanServerDefaultDomain

        void setMBeanServerDefaultDomain​(String domain)
        Sets the default domain on the MBean server
        Parameters:
        domain - the domain
      • getMBeanServerDefaultDomain

        String getMBeanServerDefaultDomain()
        Gets the default domain on the MBean server
        Returns:
        the domain
      • setMBeanObjectDomainName

        void setMBeanObjectDomainName​(String domainName)
        Sets the object domain name
        Parameters:
        domainName - the object domain name
      • setUsePlatformMBeanServer

        void setUsePlatformMBeanServer​(Boolean usePlatformMBeanServer)
        Whether to use the platform MBean Server.
        Parameters:
        usePlatformMBeanServer - true to use platform MBean server
      • getUsePlatformMBeanServer

        Boolean getUsePlatformMBeanServer()
        Whether to use the platform MBean Server.
        Returns:
        true if platform MBean server is to be used
      • getOnlyRegisterProcessorWithCustomId

        Boolean getOnlyRegisterProcessorWithCustomId()
        Whether to only register processors which has a custom id assigned.

        This allows you to filter unwanted processors.

        Returns:
        true if only processors with custom id is registered
      • setOnlyRegisterProcessorWithCustomId

        void setOnlyRegisterProcessorWithCustomId​(Boolean onlyRegisterProcessorWithCustomId)
        Whether to only register processors which has a custom id assigned.

        This allows you to filter unwanted processors.

        Parameters:
        onlyRegisterProcessorWithCustomId - true to only register if custom id has been assigned
      • getRegisterAlways

        Boolean getRegisterAlways()
        Whether to always register mbeans.

        This option is default false.

        Important: If this option is enabled then any service is registered as mbean. When using dynamic EIP patterns using unique endpoint urls, you may create excessive mbeans in the registry. This could lead to degraded performance as memory consumption will rise due the rising number of mbeans.

        Returns:
        true if always registering
      • setRegisterAlways

        void setRegisterAlways​(Boolean registerAlways)
        Whether to always register mbeans.

        This option is default false.

        Important: If this option is enabled then any service is registered as mbean. When using dynamic EIP patterns using unique endpoint urls, you may create excessive mbeans in the registry. This could lead to degraded performance as memory consumption will rise due the rising number of mbeans.

        Parameters:
        registerAlways - true to always register
      • getRegisterNewRoutes

        Boolean getRegisterNewRoutes()
        Whether to register mbeans when starting a new route

        This option is default true.

        Returns:
        true to register when starting a new route
      • setRegisterNewRoutes

        void setRegisterNewRoutes​(Boolean registerNewRoutes)
        Whether to register mbeans when starting a new route

        This option is default true.

        Parameters:
        registerNewRoutes - true to register when starting a new route
      • getMask

        Boolean getMask()
        Whether to remove detected sensitive information (such as passwords) from MBean names and attributes.

        This option is default false.

      • setMask

        void setMask​(Boolean sanitize)
        Whether to remove detected sensitive information (such as passwords) from MBean names and attributes.

        This option is default false.

      • getIncludeHostName

        Boolean getIncludeHostName()
        Gets whether host name is included in MBean names.
        Returns:
        true if included
      • setIncludeHostName

        void setIncludeHostName​(Boolean includeHostName)
        Sets whether to include host name in the ManagementObjectNameStrategy.

        By default this is turned off from Camel 2.13 onwards, but this option can be set to true to include the hostname as Camel 2.12 or older releases does.

        Parameters:
        includeHostName - true to include host name in the MBean names.
      • getManagementNamePattern

        String getManagementNamePattern()
        The naming pattern for creating the CamelContext management name.

        The default pattern is #name#

      • setManagementNamePattern

        void setManagementNamePattern​(String managementNamePattern)
        The naming pattern for creating the CamelContext management name.

        The default pattern is #name#

      • setLoadStatisticsEnabled

        void setLoadStatisticsEnabled​(Boolean flag)
        Sets whether load statistics is enabled (gathers load statistics using a background thread per CamelContext).

        The default value is false

        Parameters:
        flag - true to enable load statistics
      • getLoadStatisticsEnabled

        Boolean getLoadStatisticsEnabled()
        Gets whether load statistics is enabled
        Returns:
        true if enabled
      • setEndpointRuntimeStatisticsEnabled

        void setEndpointRuntimeStatisticsEnabled​(Boolean flag)
        Sets whether endpoint runtime statistics is enabled (gathers runtime usage of each incoming and outgoing endpoints).

        The default value is false

        Parameters:
        flag - true to enable endpoint runtime statistics
      • getEndpointRuntimeStatisticsEnabled

        Boolean getEndpointRuntimeStatisticsEnabled()
        Gets whether endpoint runtime statistics is enabled
        Returns:
        true if enabled
      • getUseHostIPAddress

        Boolean getUseHostIPAddress()
        Gets whether host IP Address to be used instead of host name.
        Returns:
        true if included
      • setUseHostIPAddress

        void setUseHostIPAddress​(Boolean useHostIPAddress)
        Sets whether to use host IP Address
        Parameters:
        useHostIPAddress - true to use IP Address.