Examples of sendAndReceiveCAS()


Examples of org.apache.uima.aae.client.UimaAsynchronousEngine.sendAndReceiveCAS()

    appCtx.put(UimaAsynchronousEngine.CasPoolSize, 2);
    uimaAsEngine.initialize(appCtx);
    CAS cas = uimaAsEngine.getCAS();
    String text = IOUtils.toString(input);
    cas.setDocumentText(text);
    uimaAsEngine.sendAndReceiveCAS(cas);
    return cas;
  }

  class SimpleUimaAsBaseCallbackListener extends UimaAsBaseCallbackListener {
    @Override
View Full Code Here

Examples of org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngine_impl.sendAndReceiveCAS()

    appCtx.put(UimaAsynchronousEngine.CasPoolSize, 2);
    uimaAsEngine.initialize(appCtx);
    CAS cas = uimaAsEngine.getCAS();
    String text = IOUtils.toString(input);
    cas.setDocumentText(text);
    uimaAsEngine.sendAndReceiveCAS(cas);
    return cas;
  }

  class SimpleUimaAsBaseCallbackListener extends UimaAsBaseCallbackListener {
    @Override
View Full Code Here

Examples of org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngine_impl.sendAndReceiveCAS()

    appCtx.put(UimaAsynchronousEngine.GetMetaTimeout, 0);
    initialize(eeUimaEngine, appCtx);
    waitUntilInitialized();
    CAS cas = eeUimaEngine.getCAS();
    try {
      eeUimaEngine.sendAndReceiveCAS(cas);
    } catch (Exception e) {
      e.printStackTrace();
    } finally {
      eeUimaEngine.collectionProcessingComplete();
      cas.reset();
View Full Code Here

Examples of org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngine_impl.sendAndReceiveCAS()

      for (int i = 0; i < 15; i++) {
        CAS cas = uimaAsEngine.getCAS();
        cas.setDocumentText("Some Text");
        System.out.println("UIMA AS Client Sending CAS#" + (i + 1) + " Request to a Service");
        try {
          uimaAsEngine.sendAndReceiveCAS(cas,componentMetricsList);
          System.out.println("-------> Client Received Performance Metrics of Size:"+componentMetricsList.size());
        } catch( Exception e) {
          errorCount++;
        } finally {
          cas.release();
View Full Code Here

Examples of org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngine_impl.sendAndReceiveCAS()

      for (int i = 0; i < 15; i++) {
        CAS cas = uimaAsEngine.getCAS();
        cas.setDocumentText("Some Text");
        System.out.println("UIMA AS Client Sending CAS#" + (i + 1) + " Request to a Service");
        try {
          uimaAsEngine.sendAndReceiveCAS(cas);
        } catch( Exception e) {
          errorCount++;
        } finally {
          cas.release();
        }
View Full Code Here

Examples of org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngine_impl.sendAndReceiveCAS()

    appCtx.put(UimaAsynchronousEngine.GetMetaTimeout, 0);
    initialize(eeUimaEngine, appCtx);
    waitUntilInitialized();
    CAS cas = eeUimaEngine.getCAS();
    try {
      eeUimaEngine.sendAndReceiveCAS(cas);
    } catch (Exception e) {
      e.printStackTrace();
    } finally {
      eeUimaEngine.collectionProcessingComplete();
      cas.reset();
View Full Code Here

Examples of org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngine_impl.sendAndReceiveCAS()

    initialize(eeUimaEngine, appCtx);
    waitUntilInitialized();
    System.out.println("Client Initialized");
    CAS cas = eeUimaEngine.getCAS();
    for (int i = 0; i < 3; i++) {
      eeUimaEngine.sendAndReceiveCAS(cas);
      cas.reset();
    }
    System.out.println("Client Sending CPC");

    // Send CPC. The service should recreate a session and send CPC reply
View Full Code Here

Examples of org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngine_impl.sendAndReceiveCAS()

    // Send CPC. The service should recreate a session and send CPC reply
    eeUimaEngine.collectionProcessingComplete();

    // Now send some CASes and sleep to let the inactivity timer pop again
    for (int i = 0; i < 3; i++) {
      eeUimaEngine.sendAndReceiveCAS(cas); // This will start a timer on reply queue
      cas.reset();
    }
    // Send another CPC
    eeUimaEngine.collectionProcessingComplete();
View Full Code Here

Examples of org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngine_impl.sendAndReceiveCAS()

    initialize(eeUimaEngine, appCtx);
    waitUntilInitialized();
    System.out.println("Client Initialized");

    CAS cas = eeUimaEngine.getCAS();
    eeUimaEngine.sendAndReceiveCAS(cas); // This will start a timer on reply queue
    cas.reset();
    // Now sleep for 8 seconds to let the service timeout on its reply queue due
    // to a 5 second inactivity timeout
    Thread.currentThread().sleep(8000);
    System.out.println("Client Sending CPC");
View Full Code Here

Examples of org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngine_impl.sendAndReceiveCAS()

    // Send CPC. The service should recreate a session and send CPC reply
    eeUimaEngine.collectionProcessingComplete();
    // Now send some CASes and sleep to let the inactivity timer pop again
    for (int i = 0; i < 5; i++) {
      eeUimaEngine.sendAndReceiveCAS(cas); // This will start a timer on reply queue
      cas.reset();
      if (i == 3) {
        Thread.currentThread().sleep(8000);
      }
    }
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.