Package org.apache.ofbiz.service.jms
Class JmsListenerFactory
- java.lang.Object
-
- org.apache.ofbiz.service.jms.JmsListenerFactory
-
- All Implemented Interfaces:
java.lang.Runnable
public class JmsListenerFactory extends java.lang.Object implements java.lang.Runnable
JmsListenerFactory
-
-
Field Summary
Fields Modifier and Type Field Description protected int
connected
protected Delegator
delegator
protected boolean
firstPass
protected static java.util.Map<java.lang.String,GenericMessageListener>
listeners
protected int
loadable
static java.lang.String
module
static java.lang.String
QUEUE_LISTENER_CLASS
protected static java.util.Map<java.lang.String,Server>
servers
protected java.lang.Thread
thread
static java.lang.String
TOPIC_LISTENER_CLASS
-
Constructor Summary
Constructors Constructor Description JmsListenerFactory(Delegator delegator)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
closeListener(java.lang.String serverKey)
Close a JMS message listener.void
closeListeners()
Close all the JMS message listeners.static JmsListenerFactory
getInstance(Delegator delegator)
java.util.Map<java.lang.String,GenericMessageListener>
getJMSListeners()
Gets a Map of JMS Listeners.void
loadListener(java.lang.String serverKey)
Load a JMS message listener.void
refreshListener(java.lang.String serverKey)
Refresh a JMS message listener.void
run()
-
-
-
Field Detail
-
module
public static final java.lang.String module
-
TOPIC_LISTENER_CLASS
public static final java.lang.String TOPIC_LISTENER_CLASS
- See Also:
- Constant Field Values
-
QUEUE_LISTENER_CLASS
public static final java.lang.String QUEUE_LISTENER_CLASS
- See Also:
- Constant Field Values
-
listeners
protected static java.util.Map<java.lang.String,GenericMessageListener> listeners
-
servers
protected static java.util.Map<java.lang.String,Server> servers
-
delegator
protected Delegator delegator
-
firstPass
protected boolean firstPass
-
loadable
protected int loadable
-
connected
protected int connected
-
thread
protected java.lang.Thread thread
-
-
Constructor Detail
-
JmsListenerFactory
public JmsListenerFactory(Delegator delegator)
-
-
Method Detail
-
getInstance
public static JmsListenerFactory getInstance(Delegator delegator)
-
run
public void run()
- Specified by:
run
in interfacejava.lang.Runnable
-
loadListener
public void loadListener(java.lang.String serverKey) throws GenericServiceException
Load a JMS message listener.- Parameters:
serverKey
- Name of the jms-service- Throws:
GenericServiceException
-
closeListeners
public void closeListeners() throws GenericServiceException
Close all the JMS message listeners.- Throws:
GenericServiceException
-
closeListener
public void closeListener(java.lang.String serverKey) throws GenericServiceException
Close a JMS message listener.- Parameters:
serverKey
- Name of the jms-service- Throws:
GenericServiceException
-
refreshListener
public void refreshListener(java.lang.String serverKey) throws GenericServiceException
Refresh a JMS message listener.- Parameters:
serverKey
- Name of the jms-service- Throws:
GenericServiceException
-
getJMSListeners
public java.util.Map<java.lang.String,GenericMessageListener> getJMSListeners()
Gets a Map of JMS Listeners.- Returns:
- Map of JMS Listeners
-
-