biz.hammurapi.jms.adapter
Class JmsService
java.lang.Object
biz.hammurapi.config.ComponentBase
biz.hammurapi.config.ServiceBase
biz.hammurapi.jms.adapter.JmsService
- All Implemented Interfaces:
- biz.hammurapi.config.Component, biz.hammurapi.config.Context, biz.hammurapi.config.Service, biz.hammurapi.metrics.MeasurementCollector, biz.hammurapi.metrics.MeasurementConsumer
public class JmsService
- extends biz.hammurapi.config.ServiceBase
Fields inherited from class biz.hammurapi.config.ComponentBase |
owner |
Constructor Summary |
JmsService(biz.hammurapi.jms.adapter.definition.JmsService definition)
|
Method Summary |
biz.hammurapi.util.Worker |
getWorker()
|
java.lang.Object |
request(java.lang.Object obj)
Sends object JMS destination, waits for reply, receives reply converts to Object
and returns. |
void |
request(java.lang.Object obj,
Processor receptor)
Asynchronously performs request/reply operation in worker thread. |
void |
send(java.lang.Object obj,
boolean async)
Sends object to JMS destination. |
protected 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 |
JmsService
public JmsService(biz.hammurapi.jms.adapter.definition.JmsService definition)
throws biz.hammurapi.config.ConfigurationException
- Throws:
biz.hammurapi.config.ConfigurationException
getWorker
public biz.hammurapi.util.Worker getWorker()
startInternal
protected void startInternal()
throws biz.hammurapi.config.ConfigurationException
- Specified by:
startInternal
in class biz.hammurapi.config.ServiceBase
- 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
send
public void send(java.lang.Object obj,
boolean async)
throws javax.jms.JMSException
- Sends object to JMS destination.
- Parameters:
obj
- Object to sendasync
- If true all operations are performed in a worker thread.
- Throws:
javax.jms.JMSException
request
public java.lang.Object request(java.lang.Object obj)
throws javax.jms.JMSException
- Sends object JMS destination, waits for reply, receives reply converts to Object
and returns. Reply message is correlated on send message ID if reply destination is set.
If reply destination is not specified in configuration then temporary reply destination is
used. If wait expires this method returns null.
- Parameters:
obj
- Object to send.
- Returns:
- Reply object.
- Throws:
javax.jms.JMSException
request
public void request(java.lang.Object obj,
Processor receptor)
- Asynchronously performs request/reply operation in worker thread.
- Parameters:
obj
- Object to sendreceptor
- Processor for reply. In the case of failure, exception is passed to the processor.
Copyright © 2006 Hammurapi Group. All Rights Reserved.