org.apache.felix.ipojo.extender.queue

## Interface QueueListener

All Known Implementing Classes:
  ReplayQueueEventProxy

    public interface QueueListener

A `QueueListener` provides queue management information to external entities:

- Job submission
- Job execution
- Job result (success or failure)

Implementer of this interface should not block as the invocation is done synchronously. Implementers are responsible to register themselves in the `QueueService` they'll observe.

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `enlisted(JobInfo info)` Invoked when a job is just being enlisted (before processing).
`void` `executed(JobInfo info, java.lang.Object result)` Invoked when a job's execution is finished successfully.
`void` `failed(JobInfo info, java.lang.Throwable throwable)` Invoked when a job's execution is finished with error.
`void` `started(JobInfo info)` Invoked when a job's execution is just about to be started.

### Method Detail

#### enlisted

    void enlisted(JobInfo info)

Invoked when a job is just being enlisted (before processing). Only `JobInfo.getEnlistmentTime()` and `JobInfo.getWaitDuration()` provides meaningful values. Note that `waitDuration` value is re-evaluated at each call.

Parameters:
  `info` - The job being enlisted

#### started

    void started(JobInfo info)

Invoked when a job's execution is just about to be started. Only `JobInfo.getEnlistmentTime()`, `JobInfo.getWaitDuration()`, `JobInfo.getStartTime()` and `JobInfo.getExecutionDuration()` provides meaningful values. Note that `executionDuration` value is re-evaluated at each call.

Parameters:
  `info` - The job being started

#### executed

    void executed(JobInfo info,
                  java.lang.Object result)

Invoked when a job's execution is finished successfully. Note the implementers should not retain any references to the provided `result` (memory leak).

Parameters:
  `info` - The executed job
  `result` - The job's result

#### failed

    void failed(JobInfo info,
                java.lang.Throwable throwable)

Invoked when a job's execution is finished with error. Note the implementers should not retain any references to the provided `throwable` (memory leak).

Parameters:
  `info` - The failed job
  `throwable` - The job's thrown exception