Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.deegree.framework.concurrent
Class ExecutionFinishedEvent<T>

    java.lang.Object
      org.deegree.framework.concurrent.ExecutionFinishedEvent<T>

Type Parameters:
  `T` - type of return value

    public class ExecutionFinishedEvent<T>

extends Object

Event that is sent when asynchronous task finished.

This can mean:

- it finished successfully
- it terminated abnormally (with an exception or error)
- a time out occurred during the performing of the task (or it's thread has been cancelled)

If the task did not finish successfully, the thrown exception / error is rethrown when `getResult()` is called.

Version:
  $Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18. Jun 2009) $
Author:
  Andreas Poth, Markus Schneider, last edited by: $Author: mschneider $

Constructor Summary
`ExecutionFinishedEvent(Callable<T> task, T result)` Constructs an `ExecutionFinishedEvent` for a task that finished successfully.
`ExecutionFinishedEvent(Throwable t, Callable<T> task)` Constructs an `ExecutionFinishedEvent` for a task that terminated abnormally.

Method Summary
`T` | `getResult()` Returns the result value that the finished task returned.
`Callable<T>` | `getTask()` Returns the corresponding task instance.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ExecutionFinishedEvent

    ExecutionFinishedEvent(Callable<T> task,
                           T result)

  Constructs an `ExecutionFinishedEvent` for a task that finished successfully.

  Parameters:
    `task` -
    `result` -

### ExecutionFinishedEvent

    ExecutionFinishedEvent(Throwable t,
                           Callable<T> task)

  Constructs an `ExecutionFinishedEvent` for a task that terminated abnormally.

  Parameters:
    `t` - Throwable that the terminated task threw
    `task` -

Method Detail

### getTask

    public Callable<T> getTask()

  Returns the corresponding task instance.

  Returns:
    the corresponding task instance

### getResult

    public T getResult()
                throws CancellationException,
                       Throwable

  Returns the result value that the finished task returned.

  If the task produced an exception or error, it is rethrown here. If the task has been cancelled (usually this means that the time out occurred), a `CancellationException` is thrown.

  Returns:
    the result value that the task returned
  Throws:
    `CancellationException` - if task timed out / has been cancelled
    `Throwable` - if task terminated with an exception or error

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org