    <!-- Services for Camel Router, Endpoint and Performance Counter
      -  This XML fragment is suitable for including in plugin XML files for
      -  applications that embed Camel.
      -->
    
    <filter name="fuse_routing_domain" value="org.apache.camel"/>

    <service name="Router">
        <property name="OBJECT_NAME" value="${fuse_routing_domain}:context=*,type=context,name=*"/>
		<config>
			<option name="context" description="Router Name" default=""/> 
		</config> 
		<plugin type="autoinventory"/>
		<plugin type="control" class="org.hyperic.hq.product.jmx.MxControlPlugin"/>
		<actions include="start,stop"/>
		<metric name="Availability" template="${OBJECT_NAME}:Availability" indicator="true"/>
    </service>
    
    <service name="Router Endpoint">
	    <property name="OBJECT_NAME" value="${fuse_routing_domain}:context=*,type=endpoints,name=*"/>
		<config>
			<option name="context" description="Router Name" default=""/>
			<option name="endpoints" description="Camel Component" default=""/>
			<option name="name" description="Endpoint Name" default=""/>
		</config>
		<plugin type="autoinventory"/>
		<plugin type="control" class="org.hyperic.hq.product.jmx.MxControlPlugin"/>
		<actions include="start,stop"/>
		<metric name="Availability" indicator="true"/>
    </service>

    <service name="Router Component">
        <property name="OBJECT_NAME" value="${fuse_routing_domain}:context=*,type=components,name=*"/>
        <config>
            <option name="context" description="Router Name" default=""/>
            <option name="component" description="Camel Component" default=""/>
            <option name="name" description="Endpoint Name" default=""/>
        </config>
        <plugin type="autoinventory"/>
        <plugin type="control" class="org.hyperic.hq.product.jmx.MxControlPlugin"/>
        <actions include="start,stop"/>
        <metric name="Availability" indicator="true"/>
    </service>

    <service name="Route">
        <property name="OBJECT_NAME" value="${fuse_routing_domain}:context=*,type=routes,name=*"/>
        <config>
            <option name="context" description="Router Name" default=""/>
            <option name="route" description="Endpoint Name" default=""/>
        </config>
        <plugin type="autoinventory"/>
        <plugin type="control" class="org.hyperic.hq.product.jmx.MxControlPlugin"/>
        <actions include="start,stop,reset,shutdown,getState,getDescription,getCamelId,setTracing,getRoutingPolicy,getEndpointUri,getRouteId,getTracing,getInflightExchanges,setStatisticsEnabled,getExchangesCompleted,getExchangesFailed,getMinProcessingTime,getMeanProcessingTime,getMaxProcessingTime,getTotalProcessingTime,getLastProcessingTime,getLastExchangeCompletedTimestamp,getFirstExchangeCompletedTimestamp,getLastExchangeFailureTimestamp,getFirstExchangeFailureTimestamp,isStatisticsEnabled,getExchangesTotal"/>
	<metric name="Availability" template="${OBJECT_NAME}:Availability" indicator="true" category="AVAILABILITY"/>
        <metric name="ExchangesCompleted"  indicator="true" units="none" collectionType="trendsup" category="THROUGHPUT"/> 
        <metric name="ExchangesFailed"     indicator="true" units="none" collectionType="trendsup" category="THROUGHPUT"/>
        <metric name="ExchangesTotal"      indicator="true" units="none" collectionType="trendsup" category="THROUGHPUT"/> 
        <metric name="InflightExchanges"   indicator="true" units="none" collectionType="trendsup" category="THROUGHPUT"/>
        <metric name="MinProcessingTime"   indicator="true" units="ms"   collectionType="dynamic"  category="PERFORMANCE"/>
        <metric name="MeanProcessingTime"  indicator="true" units="ms"   collectionType="dynamic"  category="PERFORMANCE"/>
        <metric name="MaxProcessingTime"   indicator="true" units="ms"   collectionType="dynamic"  category="PERFORMANCE"/>
        <metric name="TotalProcessingTime" indicator="true" units="ms"   collectionType="dynamic"  category="PERFORMANCE"/>
        <metric name="LastProcessingTime"  indicator="true" units="ms"   collectionType="dynamic"  category="PERFORMANCE"/>
    </service>

    <service name="Processors">
        <property name="OBJECT_NAME" value="${fuse_routing_domain}:context=*,type=processors,name=*"/>
        <config>
            <option name="context" description="Router Name" default=""/>
        </config>
        <plugin type="autoinventory"/>
        <plugin type="control" class="org.hyperic.hq.product.jmx.MxControlPlugin"/>
        <actions include="start,stop,reset,getCamelId,getRouteId,getProcessorId"/>
	<metric name="Availability" template="${OBJECT_NAME}:Availability" indicator="true" category="AVAILABILITY"/>
        <metric name="ExchangesCompleted"   indicator="true" units="none" collectionType="trendsup" category="THROUGHPUT"/> 
        <metric name="ExchangesFailed"      indicator="true" units="none" collectionType="trendsup" category="THROUGHPUT"/>
        <metric name="ExchangesTotal"       indicator="true" units="none" collectionType="trendsup" category="THROUGHPUT"/> 
        <metric name="MinProcessingTime"    indicator="true" units="ms"   collectionType="dynamic"  category="PERFORMANCE"/>
        <metric name="MeanProcessingTime"   indicator="true" units="ms"   collectionType="dynamic"  category="PERFORMANCE"/>
        <metric name="MaxProcessingTime"    indicator="true" units="ms"   collectionType="dynamic"  category="PERFORMANCE"/>
        <metric name="TotalProcessingTime"  indicator="true" units="ms"   collectionType="dynamic"  category="PERFORMANCE"/>
        <metric name="LastProcessingTime"   indicator="true" units="ms"   collectionType="dynamic"  category="PERFORMANCE"/>
    </service>
