Package org.apache.uima.ducc.rm

Examples of org.apache.uima.ducc.rm.ResourceManagerComponent


        @Bean
        public ResourceManagerComponent resourceManager()
        throws Throwable
        {
            String methodName = "resourceManager";
            ResourceManagerComponent rm = null;
            try {           
                rm = new ResourceManagerComponent(common.camelContext());

                // rm.init();

                rm.setTransportConfiguration(resourceManagerTransport.duccEventDispatcher(common.rmStateUpdateEndpoint, rm.getContext()),
                                             common.rmStateUpdateEndpoint);
       
                //  Instantiate Resource Manager delegate listener. This listener will receive
                //  incoming messages.
                ResourceManagerEventListener delegateListener = this.resourceManagerDelegateListener(rm);

                //  Inject a dispatcher into the listener in case it needs to send
                //  a message to another component.
                delegateListener.setDuccEventDispatcher(resourceManagerTransport.duccEventDispatcher(common.orchestratorStateUpdateEndpoint,rm.getContext()));

                //  Inject Camel Router that will generate state updates at regular intervals
                // jrc rm.getContext().addRoutes(this.routeBuilderForRMStateUpdate(rm, common.rmStateUpdateEndpoint, Integer.parseInt(common.rmStatePublishRate)));

                //  Inject Camel Router that will handle Job Manager state update messages
                // rm.getContext().addRoutes(this.routeBuilderForEndpoint(common.orchestratorStateUpdateEndpoint, delegateListener));
                rm.getContext().addRoutes(this.routeBuilderForEndpoint(common.orchestratorAbbreviatedStateUpdateEndpoint, delegateListener));

                //  Inject Camel Router that will handle Agent Node inventory update messages
                // rm.getContext().addRoutes(this.routeBuilderForEndpoint(common.nodeInventoryEndpoint,delegateListener));

                //  Inject Camel Router that will handle Node Metrics messages
                rm.getContext().addRoutes(this.routeBuilderForEndpoint(common.nodeMetricsEndpoint, delegateListener));
               
                return rm;
            } catch ( Throwable t ) {
                logger.fatal(methodName, null, t);
                throw new IllegalStateException("Can't start RM: " + t.getMessage());
View Full Code Here

TOP

Related Classes of org.apache.uima.ducc.rm.ResourceManagerComponent

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.