Examples of UimaAsContext


Examples of org.apache.uima.aae.UimaAsContext

      }
    }

    // Only delegate controllers execute the logic below
    if (parentController != null) {
      UimaAsContext uimaAsContext = new UimaAsContext();
      if (!registeredWithJMXServer) {
        registeredWithJMXServer = true;
        registerServiceWithJMX(jmxContext, false);
      }
      // Determine how many consumer threads to create. First though use the parent Aggregate
      // Controller
      // to lookup this delegate key. Next fetch the delegate endpoint which contains
      // concurrentConsumers property.
      String key = ((AggregateAnalysisEngineController) parentController)
              .lookUpDelegateKey(getName());
      int concurrentRequestConsumers = 1;
      int concurrentReplyConsumers = 1;
      if (key != null) {
        Endpoint e = ((AggregateAnalysisEngineController) parentController).lookUpEndpoint(key,
                false);
        concurrentRequestConsumers = e.getConcurrentRequestConsumers();
        concurrentReplyConsumers = e.getConcurrentReplyConsumers();
      }
     
      if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
          UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
                  "initializeVMTransport", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
                  "UIMAEE_starting_colocated_listener__INFO", new Object[] {getComponentName(),concurrentRequestConsumers,concurrentReplyConsumers });
      }
      uimaAsContext.setConcurrentConsumerCount(concurrentRequestConsumers);
      uimaAsContext.put("EndpointName", endpointName);

      UimaTransport vmTransport = getTransport(uimaAsContext);
      // Creates delegate Listener for receiving requests from the parent
      UimaMessageListener messageListener = vmTransport.produceUimaMessageListener();
      // Plug in message handlers
      messageListener.initialize(uimaAsContext);
      // Store the listener
      messageListeners.put(getName(), messageListener);
      // Creates parent controller dispatcher for this delegate. The dispatcher is wired
      // with this delegate's listener.
      UimaAsContext uimaAsContext2 = new UimaAsContext();
      // Set up as many reply threads as there are threads to process requests
      uimaAsContext2.setConcurrentConsumerCount(concurrentReplyConsumers);
      uimaAsContext2.put("EndpointName", endpointName);
      UimaTransport parentVmTransport = parentController.getTransport(uimaAsContext2, endpointName);

      parentVmTransport.produceUimaMessageDispatcher(vmTransport);
      // Creates parent listener for receiving replies from this delegate.
      UimaMessageListener parentListener = parentVmTransport.produceUimaMessageListener();
View Full Code Here

Examples of org.apache.uima.aae.UimaAsContext

      }
    }

    // Only delegate controllers execute the logic below
    if (parentController != null) {
      UimaAsContext uimaAsContext = new UimaAsContext();
      if (!registeredWithJMXServer) {
        registeredWithJMXServer = true;
        registerServiceWithJMX(jmxContext, false);
      }
      // Determine how many consumer threads to create. First though use the parent Aggregate
      // Controller
      // to lookup this delegate key. Next fetch the delegate endpoint which contains
      // concurrentConsumers property.
      String key = ((AggregateAnalysisEngineController) parentController)
              .lookUpDelegateKey(getName());
      int concurrentRequestConsumers = 1;
      int concurrentReplyConsumers = 1;
      if (key != null) {
        Endpoint e = ((AggregateAnalysisEngineController) parentController).lookUpEndpoint(key,
                false);
        concurrentRequestConsumers = e.getConcurrentRequestConsumers();
        concurrentReplyConsumers = e.getConcurrentReplyConsumers();
      }
     
      if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
          UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
                  "initializeVMTransport", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
                  "UIMAEE_starting_colocated_listener__INFO", new Object[] {getComponentName(),concurrentRequestConsumers,concurrentReplyConsumers });
      }
      uimaAsContext.setConcurrentConsumerCount(concurrentRequestConsumers);
      uimaAsContext.put("EndpointName", endpointName);

      UimaTransport vmTransport = getTransport(uimaAsContext);
      // Creates delegate Listener for receiving requests from the parent
      UimaMessageListener messageListener = vmTransport.produceUimaMessageListener();
      // Plug in message handlers
      messageListener.initialize(uimaAsContext);
      // Store the listener
      messageListeners.put(getName(), messageListener);
      // Creates parent controller dispatcher for this delegate. The dispatcher is wired
      // with this delegate's listener.
      UimaAsContext uimaAsContext2 = new UimaAsContext();
      // Set up as many reply threads as there are threads to process requests
      uimaAsContext2.setConcurrentConsumerCount(concurrentReplyConsumers);
      uimaAsContext2.put("EndpointName", endpointName);
      UimaTransport parentVmTransport = parentController.getTransport(uimaAsContext2, endpointName);

      parentVmTransport.produceUimaMessageDispatcher(vmTransport);
      // Creates parent listener for receiving replies from this delegate.
      UimaMessageListener parentListener = parentVmTransport.produceUimaMessageListener();
View Full Code Here

Examples of org.apache.uima.aae.UimaAsContext

      }
    }

    // Only delegate controllers execute the logic below
    if (parentController != null) {
      UimaAsContext uimaAsContext = new UimaAsContext();
      if (!registeredWithJMXServer) {
        registeredWithJMXServer = true;
        registerServiceWithJMX(jmxContext, false);
      }
      // Determine how many consumer threads to create. First though use the parent Aggregate
      // Controller
      // to lookup this delegate key. Next fetch the delegate endpoint which contains
      // concurrentConsumers property.
      String key = ((AggregateAnalysisEngineController) parentController)
              .lookUpDelegateKey(getName());
      int concurrentRequestConsumers = 1;
      int concurrentReplyConsumers = 1;
      if (key != null) {
        Endpoint e = ((AggregateAnalysisEngineController) parentController).lookUpEndpoint(key,
                false);
        concurrentRequestConsumers = e.getConcurrentRequestConsumers();
        concurrentReplyConsumers = e.getConcurrentReplyConsumers();
      }

      System.out.println("Controller:" + getComponentName() + " Starting Request Listener With "
              + concurrentRequestConsumers
              + " Concurrent Consumers. Reply Listener Configured With " + concurrentReplyConsumers
              + " Concurrent Consumers");

      uimaAsContext.setConcurrentConsumerCount(concurrentRequestConsumers);
      uimaAsContext.put("EndpointName", endpointName);

      UimaTransport vmTransport = getTransport(uimaAsContext);
      // Creates delegate Listener for receiving requests from the parent
      UimaMessageListener messageListener = vmTransport.produceUimaMessageListener();
      // Plug in message handlers
      messageListener.initialize(uimaAsContext);
      // Store the listener
      messageListeners.put(getName(), messageListener);
      // Creates parent controller dispatcher for this delegate. The dispatcher is wired
      // with this delegate's listener.
      UimaAsContext uimaAsContext2 = new UimaAsContext();
      // Set up as many reply threads as there are threads to process requests
      uimaAsContext2.setConcurrentConsumerCount(concurrentReplyConsumers);
      uimaAsContext2.put("EndpointName", endpointName);
      UimaTransport parentVmTransport = parentController.getTransport(uimaAsContext2, endpointName);

      parentVmTransport.produceUimaMessageDispatcher(vmTransport);
      // Creates parent listener for receiving replies from this delegate.
      UimaMessageListener parentListener = parentVmTransport.produceUimaMessageListener();
View Full Code Here

Examples of org.apache.uima.aae.UimaAsContext

      }
    }

    // Only delegate controllers execute the logic below
    if (parentController != null) {
      UimaAsContext uimaAsContext = new UimaAsContext();
      if (!registeredWithJMXServer) {
        registeredWithJMXServer = true;
        registerServiceWithJMX(jmxContext, false);
      }
      // Determine how many consumer threads to create. First though use the parent Aggregate
      // Controller
      // to lookup this delegate key. Next fetch the delegate endpoint which contains
      // concurrentConsumers property.
      String key = ((AggregateAnalysisEngineController) parentController)
              .lookUpDelegateKey(getName());
      int concurrentRequestConsumers = 1;
      int concurrentReplyConsumers = 1;
      if (key != null) {
        Endpoint e = ((AggregateAnalysisEngineController) parentController).lookUpEndpoint(key,
                false);
        concurrentRequestConsumers = e.getConcurrentRequestConsumers();
        concurrentReplyConsumers = e.getConcurrentReplyConsumers();
      }
     
      if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
          UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
                  "initializeVMTransport", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
                  "UIMAEE_starting_colocated_listener__INFO", new Object[] {getComponentName(),concurrentRequestConsumers,concurrentReplyConsumers });
      }
      uimaAsContext.setConcurrentConsumerCount(concurrentRequestConsumers);
      uimaAsContext.put("EndpointName", endpointName);

      UimaTransport vmTransport = getTransport(uimaAsContext);
      // Creates delegate Listener for receiving requests from the parent
      UimaMessageListener messageListener = vmTransport.produceUimaMessageListener();
      // Plug in message handlers
      messageListener.initialize(uimaAsContext);
      // Store the listener
      messageListeners.put(getName(), messageListener);
      // Creates parent controller dispatcher for this delegate. The dispatcher is wired
      // with this delegate's listener.
      UimaAsContext uimaAsContext2 = new UimaAsContext();
      // Set up as many reply threads as there are threads to process requests
      uimaAsContext2.setConcurrentConsumerCount(concurrentReplyConsumers);
      uimaAsContext2.put("EndpointName", endpointName);
      UimaTransport parentVmTransport = parentController.getTransport(uimaAsContext2, endpointName);

      parentVmTransport.produceUimaMessageDispatcher(vmTransport);
      // Creates parent listener for receiving replies from this delegate.
      UimaMessageListener parentListener = parentVmTransport.produceUimaMessageListener();
View Full Code Here

Examples of org.apache.uima.aae.UimaAsContext

      }
    }

    // Only delegate controllers execute the logic below
    if (parentController != null) {
      UimaAsContext uimaAsContext = new UimaAsContext();
      if (!registeredWithJMXServer) {
        registeredWithJMXServer = true;
        registerServiceWithJMX(jmxContext, false);
      }
      // Determine how many consumer threads to create. First though use the parent Aggregate
      // Controller
      // to lookup this delegate key. Next fetch the delegate endpoint which contains
      // concurrentConsumers property.
      String key = ((AggregateAnalysisEngineController) parentController)
              .lookUpDelegateKey(getName());
      int concurrentRequestConsumers = 1;
      int concurrentReplyConsumers = 1;
      if (key != null) {
        Endpoint e = ((AggregateAnalysisEngineController) parentController).lookUpEndpoint(key,
                false);
        concurrentRequestConsumers = e.getConcurrentRequestConsumers();
        concurrentReplyConsumers = e.getConcurrentReplyConsumers();
      }
     
      if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
          UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
                  "initializeVMTransport", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
                  "UIMAEE_starting_colocated_listener__INFO", new Object[] {getComponentName(),concurrentRequestConsumers,concurrentReplyConsumers });
      }
      uimaAsContext.setConcurrentConsumerCount(concurrentRequestConsumers);
      uimaAsContext.put("EndpointName", endpointName);

      UimaTransport vmTransport = getTransport(uimaAsContext);
      // Creates delegate Listener for receiving requests from the parent
      UimaMessageListener messageListener = vmTransport.produceUimaMessageListener();
      // Plug in message handlers
      messageListener.initialize(uimaAsContext);
      // Store the listener
      messageListeners.put(getName(), messageListener);
      // Creates parent controller dispatcher for this delegate. The dispatcher is wired
      // with this delegate's listener.
      UimaAsContext uimaAsContext2 = new UimaAsContext();
      // Set up as many reply threads as there are threads to process requests
      uimaAsContext2.setConcurrentConsumerCount(concurrentReplyConsumers);
      uimaAsContext2.put("EndpointName", endpointName);
      UimaTransport parentVmTransport = parentController.getTransport(uimaAsContext2, endpointName);

      parentVmTransport.produceUimaMessageDispatcher(vmTransport);
      // Creates parent listener for receiving replies from this delegate.
      UimaMessageListener parentListener = parentVmTransport.produceUimaMessageListener();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.