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

## Class SynchronousQueueService

- java.lang.Object
- - org.apache.felix.ipojo.extender.internal.AbstractService
  - - org.apache.felix.ipojo.extender.internal.queue.AbstractQueueService
    - - org.apache.felix.ipojo.extender.internal.queue.SynchronousQueueService

All Implemented Interfaces:
  Lifecycle, LifecycleQueueService, QueueNotifier, QueueService

    public class SynchronousQueueService
    extends AbstractQueueService
    implements LifecycleQueueService

An implementation of the Lifecycle Queue Service for synchronous processing.

### Field Summary

### Fields inherited from class org.apache.felix.ipojo.extender.internal.queue.AbstractQueueService

`m_listeners`

### Fields inherited from class org.apache.felix.ipojo.extender.internal.AbstractService

`m_bundleContext`

### 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
`SynchronousQueueService(org.osgi.framework.BundleContext bundleContext)`

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `getCurrents()`
`int` `getFinished()`
`protected java.util.Dictionary<java.lang.String,?>` `getServiceProperties()`
`int` `getWaiters()`
`java.util.List<JobInfo>` `getWaitersInfo()`
`<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 org.apache.felix.ipojo.extender.internal.queue.AbstractQueueService

`addQueueListener, fireEnlistedJobInfo, fireExecutedJobInfo, fireFailedJobInfo, fireStartedJobInfo, removeQueueListener`

### Methods inherited from class org.apache.felix.ipojo.extender.internal.AbstractService

`getBundleContext, getRegistration, isRegistered, registerService, start, stop`

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

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

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

`addQueueListener, removeQueueListener`

### Methods inherited from interface org.apache.felix.ipojo.extender.internal.Lifecycle

`start, stop`

### Constructor Detail

#### SynchronousQueueService

    public SynchronousQueueService(org.osgi.framework.BundleContext bundleContext)

### Method Detail

#### getServiceProperties

    protected java.util.Dictionary<java.lang.String,?> getServiceProperties()

Overrides:
  `getServiceProperties` in class `AbstractService`
Returns:
  the service properties, null by default.

#### 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