Package melnorme.utilbox.concurrency

Examples of melnorme.utilbox.concurrency.OperationCancellation


     
      if(isCanceled()) {
        // Send this as an exception. It will be the responsibility of higher-level application code
        // to check if exception was a cancellation, if they want to respond differently to this case.
        throw createCommonException(ProcessHelperMessages.ExternalProcess_TaskCancelled,
            new OperationCancellation());
      } else {
        throw createCommonException(ProcessHelperMessages.ExternalProcess_ProcessTimeout, te);
      }
    }
  }
View Full Code Here


        throw (OperationCancellation) cause;
      }
     
      throw LangUIPlugin.createCoreException(LangCoreMessages.LangCore_internalError, cause);
    } catch (InterruptedException e) {
      throw new OperationCancellation();
    }
  }
View Full Code Here

      throws OperationCancellation, InvocationTargetException {
    try {
      performLongRunningComputation_do(monitor);
    } catch (CoreException ce) {
      if(monitor.isCanceled()) {
        throw new OperationCancellation();
      }
      if(ce.getCause() instanceof CancellationException) {
        // In principle this should not happen, because monitor.isCanceled() would be true.
        // But in case some operation code used other monitor or some other means to cancel...
        throw (CancellationException) ce.getCause();
View Full Code Here

TOP

Related Classes of melnorme.utilbox.concurrency.OperationCancellation

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.