Examples of cancelDelegateTimer()


Examples of org.apache.uima.aae.delegate.Delegate.cancelDelegateTimer()

        throw new ServiceNotFoundException();
      }

    } catch (Exception e) {
      if (delegate != null && aCommand == AsynchAEMessage.GetMeta) {
        delegate.cancelDelegateTimer();
      }
      // Handle the error
      ErrorContext errorContext = new ErrorContext();
      errorContext.add(AsynchAEMessage.Command, aCommand);
      errorContext.add(AsynchAEMessage.Endpoint, anEndpoint);
View Full Code Here

Examples of org.apache.uima.aae.delegate.Delegate.cancelDelegateTimer()

        Endpoint endpoint = lookUpEndpoint(key, false);
        // if the the current delegate is remote, destroy its listener
        if (endpoint != null && endpoint.isRemote()) {
          Delegate delegate = lookupDelegate(key);
          if (delegate != null) {
            delegate.cancelDelegateTimer();
          }
          stopListener(key, endpoint);
          endpoint.setStatus(Endpoint.DISABLED);
        }
        System.out.println("Controller:" + getComponentName() + " Disabled Delegate:" + key
View Full Code Here

Examples of org.apache.uima.aae.delegate.Delegate.cancelDelegateTimer()

              }
            }
            Delegate delegate = ((AggregateAnalysisEngineController) getController())
                    .lookupDelegate(delegateKey);
            if (delegate.getEndpoint().isRemote()) {
              delegate.cancelDelegateTimer();
              delegate.setState(Delegate.OK_STATE);
              delegate.setNotificationEndpoint(((MessageContext) anObjectToHandle).getEndpoint());

              if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
                UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, this.getClass().getName(),
View Full Code Here

Examples of org.apache.uima.aae.delegate.Delegate.cancelDelegateTimer()

          // both lists and send them through the ErrorHandler one at a time
          // as if these CASes timed out.

          Delegate delegate = ((AggregateAnalysisEngineController) this).lookupDelegate(key);
          // Cancel the delegate timer. No more responses are expected
          delegate.cancelDelegateTimer();
          // Check if we should force timeout on all CASes in a pending state. If this
          // method is called from ProcessCasErrorHandler we will skip this since we
          // want to first completely handle the CAS exception. Once that CAS exception
          // is handled, the ProcessCasErrorHandler will call forceTimeoutOnPendingCases
          // to time out CASes in pending lists
View Full Code Here

Examples of org.apache.uima.aae.delegate.Delegate.cancelDelegateTimer()

  }

  public void forceTimeoutOnPendingCases(String key) {
    Delegate delegate = ((AggregateAnalysisEngineController) this).lookupDelegate(key);
    // Cancel the delegate timer. No more responses are expected
    delegate.cancelDelegateTimer();
    Endpoint endpoint = delegate.getEndpoint();
    // If the delegate has CASes pending reply still, send each CAS
    // from the pending list through the error handler with
    // MessageTimeoutException as a cause of error
    while (delegate.getCasPendingReplyListSize() > 0) {
View Full Code Here

Examples of org.apache.uima.aae.delegate.Delegate.cancelDelegateTimer()

        Endpoint endpoint = lookUpEndpoint(key, false);
        // if the the current delegate is remote, destroy its listener
        if (endpoint != null && endpoint.isRemote()) {
          Delegate delegate = lookupDelegate(key);
          if (delegate != null) {
            delegate.cancelDelegateTimer();
          }
          stopListener(key, endpoint);
          endpoint.setStatus(Endpoint.DISABLED);
        }
        if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
View Full Code Here

Examples of org.apache.uima.aae.delegate.Delegate.cancelDelegateTimer()

             masterEndpoint != null && masterEndpoint.getStatus() == Endpoint.FAILED) {
          HashMap<Object, Object> map = new HashMap<Object, Object>();
          Delegate delegate = ((AggregateAnalysisEngineController) controller).lookupDelegate(delegateEndpoint.getDelegateKey());
          //  Cancel Delegate timer before entering Error Handler
          if ( delegate != null ) {
            delegate.cancelDelegateTimer();
          }
          //  Handle the Connection error in the ProcessErrorHandler
          map.put(AsynchAEMessage.Command, AsynchAEMessage.Process);
          map.put(AsynchAEMessage.CasReference, aMessage.getStringProperty(AsynchAEMessage.CasReference));
          map.put(AsynchAEMessage.Endpoint, masterEndpoint);
View Full Code Here

Examples of org.apache.uima.aae.delegate.Delegate.cancelDelegateTimer()

          // both lists and send them through the ErrorHandler one at a time
          // as if these CASes timed out.

          Delegate delegate = ((AggregateAnalysisEngineController) this).lookupDelegate(key);
          // Cancel the delegate timer. No more responses are expected
          delegate.cancelDelegateTimer();
          // Check if we should force timeout on all CASes in a pending state. If this
          // method is called from ProcessCasErrorHandler we will skip this since we
          // want to first completely handle the CAS exception. Once that CAS exception
          // is handled, the ProcessCasErrorHandler will call forceTimeoutOnPendingCases
          // to time out CASes in pending lists
View Full Code Here

Examples of org.apache.uima.aae.delegate.Delegate.cancelDelegateTimer()

  }

  public void forceTimeoutOnPendingCases(String key) {
    Delegate delegate = ((AggregateAnalysisEngineController) this).lookupDelegate(key);
    // Cancel the delegate timer. No more responses are expected
    delegate.cancelDelegateTimer();
    Endpoint endpoint = delegate.getEndpoint();
    // If the delegate has CASes pending reply still, send each CAS
    // from the pending list through the error handler with
    // MessageTimeoutException as a cause of error
    while (delegate.getCasPendingReplyListSize() > 0) {
View Full Code Here

Examples of org.apache.uima.aae.delegate.Delegate.cancelDelegateTimer()

        Endpoint endpoint = lookUpEndpoint(key, false);
        // if the the current delegate is remote, destroy its listener
        if (endpoint != null && endpoint.isRemote()) {
          Delegate delegate = lookupDelegate(key);
          if (delegate != null) {
            delegate.cancelDelegateTimer();
          }
          stopListener(key, endpoint);
          endpoint.setStatus(Endpoint.DISABLED);
        }
        if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
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.