biz.hammurapi.jms.adapter
Class Listener
java.lang.Object
biz.hammurapi.config.ComponentBase
biz.hammurapi.config.ServiceBase
biz.hammurapi.jms.adapter.Listener
- All Implemented Interfaces:
- biz.hammurapi.config.Component, biz.hammurapi.config.Context, biz.hammurapi.config.Service, biz.hammurapi.config.Wrapper, biz.hammurapi.metrics.MeasurementCollector, biz.hammurapi.metrics.MeasurementConsumer, javax.jms.MessageListener
public class Listener
- extends biz.hammurapi.config.ServiceBase
- implements javax.jms.MessageListener, biz.hammurapi.config.Wrapper
Listens for JMS messages, converts them to objects using Converter and processes
them using processor. Processors can implement Observer/Observable pattern and pass received
objects to registered observers/listeners.
- Author:
- Pavel
Fields inherited from class biz.hammurapi.config.ComponentBase |
owner |
Constructor Summary |
Listener(biz.hammurapi.jms.adapter.definition.Listener definition)
|
Method Summary |
void |
enroll(javax.jms.Session session)
Adds listener to JMS session |
java.lang.Object |
getMaster()
Returns processor. |
void |
onMessage(javax.jms.Message message)
Converts message to object and passes to processor. |
void |
startInternal()
|
protected void |
stopInternal()
|
Methods inherited from class biz.hammurapi.config.ServiceBase |
start, stop |
Methods inherited from class biz.hammurapi.config.ComponentBase |
addMeasurement, get, getChild, getMeasurementConsumer, getOwner, getOwner, setMeasurementConsumer, setOwner |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface biz.hammurapi.config.Component |
setOwner |
Listener
public Listener(biz.hammurapi.jms.adapter.definition.Listener definition)
throws biz.hammurapi.config.ConfigurationException
- Throws:
biz.hammurapi.config.ConfigurationException
stopInternal
protected void stopInternal()
throws biz.hammurapi.config.ConfigurationException
- Specified by:
stopInternal
in class biz.hammurapi.config.ServiceBase
- Throws:
biz.hammurapi.config.ConfigurationException
startInternal
public void startInternal()
throws biz.hammurapi.config.ConfigurationException
- Specified by:
startInternal
in class biz.hammurapi.config.ServiceBase
- Throws:
biz.hammurapi.config.ConfigurationException
enroll
public void enroll(javax.jms.Session session)
throws javax.jms.JMSException
- Adds listener to JMS session
- Parameters:
session
-
- Throws:
javax.jms.JMSException
onMessage
public void onMessage(javax.jms.Message message)
- Converts message to object and passes to processor.
- Specified by:
onMessage
in interface javax.jms.MessageListener
getMaster
public java.lang.Object getMaster()
- Returns processor.
- Specified by:
getMaster
in interface biz.hammurapi.config.Wrapper
Copyright © 2006 Hammurapi Group. All Rights Reserved.