org.apache.felix.ipojo.extender.internal.queue.pref.enforce

## Class ForwardingQueueService

- java.lang.Object
- - org.apache.felix.ipojo.extender.internal.queue.pref.enforce.ForwardingQueueService

All Implemented Interfaces:
  Lifecycle, LifecycleQueueService, QueueService

Direct Known Subclasses:
  EnforcedQueueService

    public abstract class ForwardingQueueService
    extends java.lang.Object
    implements LifecycleQueueService

A queue service implementation delegating to a `LifecycleQueueService`.

### Field Summary

### Fields inherited from interface org.apache.felix.ipojo.extender.queue.QueueService

`ASYNCHRONOUS_QUEUE_MODE, GLOABL_QUEUE_SCOPE, PREFERENCE_QUEUE_MODE, QUEUE_MODE_PROPERTY, QUEUE_SCOPE_PROPERTY, SYNCHRONOUS_QUEUE_MODE`

### Constructor Summary

Constructors
Constructor and Description
`ForwardingQueueService()`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`void` `addQueueListener(QueueListener listener)` Add a `QueueListener` that will be notified on events relative to this `QueueService`.
`protected abstract LifecycleQueueService` `delegate()`
`int` `getCurrents()`
`int` `getFinished()`
`int` `getWaiters()`
`java.util.List<JobInfo>` `getWaitersInfo()`
`void` `removeQueueListener(QueueListener listener)` Remove a `QueueListener` from this `QueueService`.
`void` `start()` Start the service.
`void` `stop()` Stop the service.
`<T> java.util.concurrent.Future<T>` `submit(Job<T> callable)` Submits a job to the queue service.
`<T> java.util.concurrent.Future<T>` `submit(Job<T> callable, Callback<T> callback, java.lang.String description)` Submits a job to the queue service.
`<T> java.util.concurrent.Future<T>` `submit(Job<T> callable, java.lang.String description)` Submits a job to the queue service.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ForwardingQueueService

    public ForwardingQueueService()

### Method Detail

#### delegate

    protected abstract LifecycleQueueService delegate()

#### start

    public void start()

Description copied from interface: `Lifecycle`
Start the service.

Specified by:
  `start` in interface `Lifecycle`

#### stop

    public void stop()

Description copied from interface: `Lifecycle`
Stop the service.

Specified by:
  `stop` in interface `Lifecycle`

#### getFinished

    public int getFinished()

Specified by:
  `getFinished` in interface `QueueService`
Returns:
  the number of jobs that have been executed entirely (including successful and erroneous jobs).

#### getWaiters

    public int getWaiters()

Specified by:
  `getWaiters` in interface `QueueService`
Returns:
  the number of jobs scheduled but not yet started.

#### getCurrents

    public int getCurrents()

Specified by:
  `getCurrents` in interface `QueueService`
Returns:
  the number of jobs currently executed (started but not finished).

#### getWaitersInfo

    public java.util.List<JobInfo> getWaitersInfo()

Specified by:
  `getWaitersInfo` in interface `QueueService`
Returns:
  a snapshot of the currently waiting jobs.

#### submit

    public <T> java.util.concurrent.Future<T> submit(Job<T> callable,
                                                     Callback<T> callback,
                                                     java.lang.String description)

Description copied from interface: `QueueService`
Submits a job to the queue service.

Specified by:
  `submit` in interface `QueueService`
Parameters:
  `callable` - the job
  `callback` - callback called when the job is processed
  `description` - a description of the job
Returns:
  the future object to retrieve the result

#### submit

    public <T> java.util.concurrent.Future<T> submit(Job<T> callable,
                                                     java.lang.String description)

Description copied from interface: `QueueService`
Submits a job to the queue service.

Specified by:
  `submit` in interface `QueueService`
Parameters:
  `callable` - the job
  `description` - a description of the job
Returns:
  the future object to retrieve the result

#### submit

    public <T> java.util.concurrent.Future<T> submit(Job<T> callable)

Description copied from interface: `QueueService`
Submits a job to the queue service.

Specified by:
  `submit` in interface `QueueService`
Parameters:
  `callable` - the job
Returns:
  the future object to retrieve the result

#### addQueueListener

    public void addQueueListener(QueueListener listener)

Description copied from interface: `QueueService`
Add a `QueueListener` that will be notified on events relative to this `QueueService`.

Specified by:
  `addQueueListener` in interface `QueueService`
Parameters:
  `listener` - added listener

#### removeQueueListener

    public void removeQueueListener(QueueListener listener)

Description copied from interface: `QueueService`
Remove a `QueueListener` from this `QueueService`.

Specified by:
  `removeQueueListener` in interface `QueueService`
Parameters:
  `listener` - removed listener