public abstract class AbstractQueueService extends AbstractService implements QueueService, QueueNotifier
Modifier and Type | Field and Description |
---|---|
protected java.util.List<QueueListener> |
m_listeners
Store QueueListeners.
|
m_bundleContext
ASYNCHRONOUS_QUEUE_MODE, GLOABL_QUEUE_SCOPE, PREFERENCE_QUEUE_MODE, QUEUE_MODE_PROPERTY, QUEUE_SCOPE_PROPERTY, SYNCHRONOUS_QUEUE_MODE
Modifier | Constructor and Description |
---|---|
protected |
AbstractQueueService(org.osgi.framework.BundleContext bundleContext,
java.lang.Class<?> type)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addQueueListener(QueueListener listener)
Add a
QueueListener that will be notified on events relative to this QueueService . |
void |
fireEnlistedJobInfo(JobInfo info) |
void |
fireExecutedJobInfo(JobInfo info,
java.lang.Object result) |
void |
fireFailedJobInfo(JobInfo info,
java.lang.Throwable throwable) |
void |
fireStartedJobInfo(JobInfo info) |
void |
removeQueueListener(QueueListener listener)
Remove a
QueueListener from this QueueService . |
getBundleContext, getRegistration, getServiceProperties, isRegistered, registerService, start, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCurrents, getFinished, getWaiters, getWaitersInfo, submit, submit, submit
protected final java.util.List<QueueListener> m_listeners
protected AbstractQueueService(org.osgi.framework.BundleContext bundleContext, java.lang.Class<?> type)
bundleContext
- the bundle contexttype
- the specificationpublic void addQueueListener(QueueListener listener)
QueueService
QueueListener
that will be notified on events relative to this QueueService
.addQueueListener
in interface QueueService
listener
- added listenerpublic void removeQueueListener(QueueListener listener)
QueueService
QueueListener
from this QueueService
.removeQueueListener
in interface QueueService
listener
- removed listenerpublic void fireEnlistedJobInfo(JobInfo info)
fireEnlistedJobInfo
in interface QueueNotifier
public void fireStartedJobInfo(JobInfo info)
fireStartedJobInfo
in interface QueueNotifier
public void fireExecutedJobInfo(JobInfo info, java.lang.Object result)
fireExecutedJobInfo
in interface QueueNotifier
public void fireFailedJobInfo(JobInfo info, java.lang.Throwable throwable)
fireFailedJobInfo
in interface QueueNotifier
Copyright © 2006-2014 The Apache Software Foundation. All Rights Reserved.