Codota Logo
JiffleExecutorResult
Code IndexAdd Codota to your IDE (free)

How to use
JiffleExecutorResult
in
it.geosolutions.jaiext.jiffle.runtime

Best Java code snippets using it.geosolutions.jaiext.jiffle.runtime.JiffleExecutorResult (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Gson g =
  • Codota Iconnew Gson()
  • Codota IconGsonBuilder gsonBuilder;gsonBuilder.create()
  • Codota Iconnew GsonBuilder().create()
  • Smart code suggestions by Codota
}
origin: geosolutions-it/jai-ext

/**
 * Called when the Jiffle task has been completed successfully.
 * 
 * @param ev the event containing the task results
 */
private void onCompletion(JiffleEvent ev) {
  JiffleExecutorResult result = ev.getResult();
  RenderedImage img = result.getImages().get("result");
  ImageFrame frame = new ImageFrame(img, "Jiffle image demo");
  frame.setVisible(true);
}
origin: it.geosolutions.jaiext.jiffle/jt-jiffle-language

public void run() {
  try {
    Future<JiffleExecutorResult> future = completionService.poll();
    if (future != null) {
      JiffleExecutorResult result = future.get();
      numTasksRunning-- ;
      
      if (result.isCompleted()) {
        if (LOGGER.isLoggable(Level.INFO)) {
          LOGGER.log(Level.INFO, TASK_SUCCESS_MSG, result.getTaskID());
        }
        notifySuccess(result);
        
      } else {
        if (LOGGER.isLoggable(Level.INFO)) {
          LOGGER.log(Level.INFO, TASK_FAILURE_MSG, result.getTaskID());
        }
        notifyFailure(result);
      }
    }
  } catch (Exception ex) {
    throw new RuntimeException(ex);
  }
}
origin: it.geosolutions.jaiext.jiffle/jt-jiffle-language

/**
 * Called by the system to execute this task on a thread provided by the
 * {@link JiffleExecutor}.
 * 
 * @return a result object with references to the {@code Jiffle} object,
 *         the images, and the job completion status
 */
public JiffleExecutorResult call() {
  boolean gotEx = false;
  try {
    runtime.evaluateAll(progressListener);
    
  } catch (Exception ex) {
    gotEx = true;
  }
  completed = !gotEx;
  return new JiffleExecutorResult(id, runtime, completed);
}
origin: geosolutions-it/jai-ext

@Test
public void taskCompletedOnShutdown() throws Exception {
  System.out.println("   task completed after shutdown request");
  WaitingListener listener = new WaitingListener();
  executor.addEventListener(listener);
  listener.setNumTasks(1);
  
  executor.submit(new MockJiffleRuntime(100, 5), null);
  executor.shutdown();
  if (!listener.await(2, TimeUnit.SECONDS)) {
    fail("Listener time-out period elapsed");
  }
  
  List<JiffleExecutorResult> results = listener.getResults();
  assertEquals(1, results.size());
  assertTrue(results.get(0).isCompleted());
}

origin: geosolutions-it/jai-ext

public void run() {
  try {
    Future<JiffleExecutorResult> future = completionService.poll();
    if (future != null) {
      JiffleExecutorResult result = future.get();
      numTasksRunning-- ;
      
      if (result.isCompleted()) {
        if (LOGGER.isLoggable(Level.INFO)) {
          LOGGER.log(Level.INFO, TASK_SUCCESS_MSG, result.getTaskID());
        }
        notifySuccess(result);
        
      } else {
        if (LOGGER.isLoggable(Level.INFO)) {
          LOGGER.log(Level.INFO, TASK_FAILURE_MSG, result.getTaskID());
        }
        notifyFailure(result);
      }
    }
  } catch (Exception ex) {
    throw new RuntimeException(ex);
  }
}
origin: geosolutions-it/jai-ext

assertNotNull(result);
RenderedImage dest = result.getImages().get("dest");
assertNotNull(dest);
origin: geosolutions-it/jai-ext

/**
 * Called by the system to execute this task on a thread provided by the
 * {@link JiffleExecutor}.
 * 
 * @return a result object with references to the {@code Jiffle} object,
 *         the images, and the job completion status
 */
public JiffleExecutorResult call() {
  boolean gotEx = false;
  try {
    runtime.evaluateAll(progressListener);
    
  } catch (Exception ex) {
    gotEx = true;
  }
  completed = !gotEx;
  return new JiffleExecutorResult(id, runtime, completed);
}
it.geosolutions.jaiext.jiffle.runtimeJiffleExecutorResult

Javadoc

Used by JiffleExecutor to send the results of a task to JiffleEventListeners.

Most used methods

  • getImages
    Gets source and/or destination images that were used.
  • isCompleted
    Gets the completion status of the task.
  • <init>
    Creates a new result object.
  • getTaskID
    Gets the task ID assigned by the executor.

Popular in Java

  • Reading from database using SQL prepared statement
  • findViewById (Activity)
  • getContentResolver (Context)
  • runOnUiThread (Activity)
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Dictionary (java.util)
    The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to valu
  • HashSet (java.util)
    This class implements the Set interface, backed by a hash table (actually a HashMap instance). It m
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now