org.mule.util.queue
Class AbstractQueueManager
java.lang.Object
org.mule.util.queue.AbstractQueueManager
- All Implemented Interfaces:
- MuleContextAware, Disposable, Initialisable, Startable, Stoppable, QueueManager, QueueProvider, QueueStoreCacheListener
- Direct Known Subclasses:
- TransactionalQueueManager
public abstract class AbstractQueueManager
- extends Object
- implements QueueManager, QueueProvider, QueueStoreCacheListener, MuleContextAware, Initialisable, Disposable
Abstract implementation for a QueueManager.
Contains all the logic related to queue caching and queue configuration definition.
|
Field Summary |
protected org.apache.commons.logging.Log |
logger
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.mule.api.lifecycle.Startable |
start |
| Methods inherited from interface org.mule.api.lifecycle.Stoppable |
stop |
logger
protected transient org.apache.commons.logging.Log logger
AbstractQueueManager
public AbstractQueueManager()
setDefaultQueueConfiguration
public void setDefaultQueueConfiguration(QueueConfiguration config)
- Sets the default
QueueConfiguration for any created Queue for
which a custom configuration hasn't been specified
- Specified by:
setDefaultQueueConfiguration in interface QueueManager
- Parameters:
config - an instance of QueueConfiguration
setQueueConfiguration
public void setQueueConfiguration(String queueName,
QueueConfiguration newConfig)
- Specifies a
QueueConfiguration for the queue which name matches
queueName
- Specified by:
setQueueConfiguration in interface QueueManager
- Parameters:
queueName - the name of a QueuenewConfig - an instance of QueueConfiguration
setMuleContext
public void setMuleContext(MuleContext context)
- Specified by:
setMuleContext in interface MuleContextAware
getMuleContext
protected MuleContext getMuleContext()
dispose
public final void dispose()
- Description copied from interface:
Disposable
- A lifecycle method where implementor should free up any resources. If an
exception is thrown it should just be logged and processing should continue.
This method should not throw Runtime exceptions.
- Specified by:
dispose in interface Disposable
disposeQueueStore
public void disposeQueueStore(QueueStore queueStore)
- Specified by:
disposeQueueStore in interface QueueStoreCacheListener
- Parameters:
queueStore - queue to be disposed
closeQueueStore
public void closeQueueStore(QueueStore queueStore)
- Specified by:
closeQueueStore in interface QueueStoreCacheListener
- Parameters:
queueStore - queue to be closed.
getQueue
public QueueStore getQueue(String queueName)
- Specified by:
getQueue in interface QueueProvider
- Parameters:
queueName - queue name
- Returns:
- the queue store related to the queue with queueName
clearQueueConfiguration
protected void clearQueueConfiguration(String queueName)
createQueueStore
protected abstract QueueStore createQueueStore(String name,
QueueConfiguration config)
- Creates a QueueStore
- Parameters:
name - queue nameconfig - configuration for the queue
- Returns:
- a new QueueStore for the given queue name
doDispose
protected abstract void doDispose()
- Dispose resources allocated by the implementations.
This method is run after the queues were disposed and removed from the cache.
Copyright © 2003–2014 MuleSoft, Inc.. All rights reserved.