org.mule.util.queue
Class DelegateQueueManager

java.lang.Object
  extended by org.mule.util.queue.DelegateQueueManager
All Implemented Interfaces:
MuleContextAware, Disposable, Initialisable, Lifecycle, Startable, Stoppable, QueueManager

public class DelegateQueueManager
extends Object
implements QueueManager, Lifecycle, MuleContextAware

Delegates every call to the real QueueManager. If there's a system property with mule.queue.objectstoremode=true then the old version of the QueueManager will be used. This is to maintain backward compatibility in case a customer is relaying on ObjectStore for queue store customization.


Field Summary
protected  org.apache.commons.logging.Log logger
           
static String MULE_QUEUE_OLD_MODE_KEY
           
 
Fields inherited from interface org.mule.api.lifecycle.Initialisable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Startable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Stoppable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Disposable
PHASE_NAME
 
Constructor Summary
DelegateQueueManager()
           
 
Method Summary
 void dispose()
          A lifecycle method where implementor should free up any resources.
 QueueSession getQueueSession()
          Returns a new instance of QueueSession bounded to this QueueManager
 void initialise()
          Method used to perform any initialisation work.
static boolean isOldModeEnabled()
           
 void setDefaultQueueConfiguration(QueueConfiguration config)
          Sets the default QueueConfiguration for any created Queue for which a custom configuration hasn't been specified
 void setMuleContext(MuleContext context)
           
 void setQueueConfiguration(String queueName, QueueConfiguration config)
          Specifies a QueueConfiguration for the queue which name matches queueName
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MULE_QUEUE_OLD_MODE_KEY

public static final String MULE_QUEUE_OLD_MODE_KEY
See Also:
Constant Field Values

logger

protected final org.apache.commons.logging.Log logger
Constructor Detail

DelegateQueueManager

public DelegateQueueManager()
Method Detail

getQueueSession

public QueueSession getQueueSession()
Description copied from interface: QueueManager
Returns a new instance of QueueSession bounded to this QueueManager

Specified by:
getQueueSession in interface QueueManager
Returns:
session for retrieving queues and handle transactions

setDefaultQueueConfiguration

public void setDefaultQueueConfiguration(QueueConfiguration config)
Description copied from interface: QueueManager
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 config)
Description copied from interface: QueueManager
Specifies a QueueConfiguration for the queue which name matches queueName

Specified by:
setQueueConfiguration in interface QueueManager
Parameters:
queueName - the name of a Queue
config - an instance of QueueConfiguration

start

public void start()
           throws MuleException
Specified by:
start in interface Startable
Throws:
MuleException

stop

public void stop()
          throws MuleException
Specified by:
stop in interface Stoppable
Throws:
MuleException

dispose

public 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

initialise

public void initialise()
                throws InitialisationException
Description copied from interface: Initialisable
Method used to perform any initialisation work. If a fatal error occurs during initialisation an InitialisationException should be thrown, causing the Mule instance to shutdown. If the error is recoverable, say by retrying to connect, a RecoverableException should be thrown. There is no guarantee that by throwing a Recoverable exception that the Mule instance will not shut down.

Specified by:
initialise in interface Initialisable
Throws:
InitialisationException - if a fatal error occurs causing the Mule instance to shutdown
RecoverableException - if an error occurs that can be recovered from

setMuleContext

public void setMuleContext(MuleContext context)
Specified by:
setMuleContext in interface MuleContextAware

isOldModeEnabled

public static boolean isOldModeEnabled()


Copyright © 2003–2014 MuleSoft, Inc.. All rights reserved.