|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.logicblaze.lingo.jms.impl.OneWayRequestor
A simple requestor which only supports one-way and so does not need a consumer.
Constructor Summary | |
OneWayRequestor(JmsProducer producer,
Destination serverDestination)
|
Method Summary | |
void |
close()
Closes the Requestor and its session. |
String |
createCorrelationID()
Creates a new correlation ID. |
protected void |
doSend(Destination destination,
Message message,
long timeToLive)
|
int |
getDeliveryMode()
The default delivery mode of request messages |
int |
getPriority()
The default priority of request messages |
Session |
getSession()
Provides access to the underlying JMS session so that you can create messages. |
long |
getTimeToLive()
The default time to live on request messages |
protected long |
nextCounter()
|
void |
oneWay(Destination destination,
Message message)
Sends a one way message, not waiting for the response. |
void |
oneWay(Destination destination,
Message message,
long timeToLive)
|
protected void |
populateHeaders(Message message)
|
Message |
receive(long timeout)
Receives a message waiting for a maximum timeout if the timeout value is > 0 ir waiting forever if the timeout is < 0 or not waiting at all if the timeout is zero |
Message |
request(Destination destination,
Message message)
Sends a request and waits for a reply. |
Message |
request(Destination destination,
Message message,
long timeout)
Sends a request and waits for a reply up to a maximum timeout. |
void |
setDeliveryMode(int deliveryMode)
|
void |
setPriority(int priority)
|
void |
setTimeToLive(long timeToLive)
Sets the maximum time to live for requests |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OneWayRequestor(JmsProducer producer, Destination serverDestination)
Method Detail |
public int getDeliveryMode()
public void setDeliveryMode(int deliveryMode)
public int getPriority()
public void setPriority(int priority)
public long getTimeToLive()
public void setTimeToLive(long timeToLive)
public void oneWay(Destination destination, Message message) throws JMSException
Requestor
oneWay
in interface Requestor
destination
- the server side destinationmessage
- the message to send
JMSException
public void oneWay(Destination destination, Message message, long timeToLive) throws JMSException
JMSException
public Session getSession()
Requestor
getSession
in interface Requestor
public void close() throws JMSException
Requestor
Requestor
and its session.
Since a provider may allocate some resources on behalf of a
Requestor
outside the Java virtual machine, clients
should close them when they
are not needed. Relying on garbage collection to eventually reclaim
these resources may not be timely enough.
Note that this method closes the Session
object
passed to the Requestor
constructor.
close
in interface Requestor
JMSException
- if the JMS provider fails to close the
Requestor
due to some internal
error.public Message receive(long timeout) throws JMSException
Requestor
receive
in interface Requestor
JMSException
public Message request(Destination destination, Message message) throws JMSException
Requestor
JMSReplyTo
destination, and only one reply per request
is expected.
request
in interface Requestor
destination
- the server side destinationmessage
- the message to send
JMSException
- if the JMS provider fails to complete the
request due to some internal error.public Message request(Destination destination, Message message, long timeout) throws JMSException
Requestor
JMSReplyTo
destination, and only one reply per request
is expected.
request
in interface Requestor
destination
- the server side destinationmessage
- the message to send
JMSException
- if the JMS provider fails to complete the
request due to some internal error.protected void populateHeaders(Message message) throws JMSException
JMSException
protected void doSend(Destination destination, Message message, long timeToLive) throws JMSException
JMSException
public String createCorrelationID()
createCorrelationID
in interface Requestor
protected long nextCounter()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |