org.objectweb.joram.mom.dest.jms
Class JMSAcquisition

java.lang.Object
  extended by org.objectweb.joram.mom.dest.jms.JMSModule
      extended by org.objectweb.joram.mom.dest.jms.JMSAcquisition
All Implemented Interfaces:
javax.jms.ExceptionListener, javax.jms.MessageListener, AcquisitionDaemon

public class JMSAcquisition
extends JMSModule
implements AcquisitionDaemon, javax.jms.MessageListener


Nested Class Summary
 
Nested classes/interfaces inherited from class org.objectweb.joram.mom.dest.jms.JMSModule
JMSModule.ReconnectionDaemon, JMSModule.StartupDaemon, JMSModule.XARecoverDaemon
 
Field Summary
protected  javax.jms.MessageConsumer consumer
          Consumer object.
private static org.objectweb.util.monolog.api.Logger logger
           
protected  java.lang.String selector
          Selector for filtering messages.
private  ReliableTransmitter transmitter
           
 
Fields inherited from class org.objectweb.joram.mom.dest.jms.JMSModule
clientID, cnx, cnxFact, cnxFactName, dest, destName, isXA, jndiFactory, jndiUrl, lock, notUsableMessage, password, reconnectionDaemon, session, usable, userName, xaRes
 
Constructor Summary
JMSAcquisition()
           
 
Method Summary
protected  void connectionDone()
          Sets a message listener on the foreign JMS destination.
 void onMessage(javax.jms.Message jmsMessage)
          Implements the MessageListener interface for processing the asynchronous deliveries coming from the foreign JMS server.
 void start(java.util.Properties properties, ReliableTransmitter transmitter)
          Tells the daemon to start with the given properties.
 void stop()
          Tells the daemon to stop.
private  void unsetMessageListener()
          Unsets the set message listener on the foreign JMS destination.
 
Methods inherited from class org.objectweb.joram.mom.dest.jms.JMSModule
close, doConnect, doXAConnect, init, onException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static final org.objectweb.util.monolog.api.Logger logger

consumer

protected javax.jms.MessageConsumer consumer
Consumer object.


selector

protected java.lang.String selector
Selector for filtering messages.


transmitter

private ReliableTransmitter transmitter
Constructor Detail

JMSAcquisition

public JMSAcquisition()
Method Detail

start

public void start(java.util.Properties properties,
                  ReliableTransmitter transmitter)
Description copied from interface: AcquisitionDaemon
Tells the daemon to start with the given properties.

Specified by:
start in interface AcquisitionDaemon
Parameters:
properties - The initial set of properties.
transmitter - a transmitter used to transmit retrieved messages to the MOM reliably.

stop

public void stop()
Description copied from interface: AcquisitionDaemon
Tells the daemon to stop. Any system resources previously allocated must be released.

Specified by:
stop in interface AcquisitionDaemon

connectionDone

protected void connectionDone()
Sets a message listener on the foreign JMS destination.

Overrides:
connectionDone in class JMSModule
Throws:
javax.jms.IllegalStateException - If the module state does not allow to set a listener.

unsetMessageListener

private void unsetMessageListener()
Unsets the set message listener on the foreign JMS destination.


onMessage

public void onMessage(javax.jms.Message jmsMessage)
Implements the MessageListener interface for processing the asynchronous deliveries coming from the foreign JMS server.

Specified by:
onMessage in interface javax.jms.MessageListener


Copyright © 2010 ScalAgent D.T.. All Rights Reserved.