|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.logicblaze.lingo.jms.impl.OneWayRequestor
public class OneWayRequestor
A simple requestor which only supports one-way and so does not need a consumer.
| Constructor Summary | |
|---|---|
OneWayRequestor(javax.jms.Connection connection,
javax.jms.Session session,
javax.jms.MessageProducer producer,
javax.jms.Destination serverDestination,
boolean ownsConnection)
|
|
OneWayRequestor(JmsProducerConfig config,
javax.jms.Destination serverDestination)
|
|
| Method Summary | |
|---|---|
void |
close()
Closes the Requestor and its session. |
java.lang.String |
createCorrelationID()
Creates a new correlation ID. |
void |
destroy()
|
protected void |
doSend(javax.jms.Destination destination,
javax.jms.Message message,
int deliveryMode,
int priority,
long timeToLive)
|
protected void |
doSend(javax.jms.Destination destination,
javax.jms.Message message,
long timeToLive)
|
javax.jms.Connection |
getConnection()
Provides access to the underlying Connection this requestor is using |
int |
getDeliveryMode()
|
javax.jms.MessageProducer |
getMessageProducer()
Returns the underying producer |
int |
getPriority()
|
javax.jms.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 |
static OneWayRequestor |
newInstance(javax.jms.Connection connection,
JmsProducerConfig config,
boolean ownsConnection)
|
protected long |
nextCounter()
|
protected void |
populateHeaders(javax.jms.Message message)
A hook to allow custom implementations to process headers differently. |
javax.jms.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 |
javax.jms.Message |
request(javax.jms.Destination destination,
javax.jms.Message message)
Sends a request and waits for a reply. |
javax.jms.Message |
request(javax.jms.Destination destination,
javax.jms.Message message,
long timeout)
Sends a request and waits for a reply up to a maximum timeout. |
void |
request(javax.jms.Destination destination,
javax.jms.Message requestMessage,
ReplyHandler handler,
long timeout)
Sends a request and provides a handler for all responses until the request is considered dead (or it is timed out). |
void |
send(javax.jms.Destination destination,
javax.jms.Message message)
Sends a one way message, not waiting for the response. |
void |
send(javax.jms.Destination destination,
javax.jms.Message message,
int deliveryMode,
int priority,
long timeToLive)
Sends a message to the given destination in a way that can be implemented in JMS 1.0.2b as well as using the JMS 1.1 send() method on MessageProducer |
void |
send(javax.jms.Destination destination,
javax.jms.Message message,
long timeToLive)
|
void |
setDeliveryMode(int deliveryMode)
Sets the default delivery mode of request messages |
void |
setPriority(int priority)
Sets the default priority of request messages |
void |
setTimeToLive(long timeToLive)
Sets the maximum time to live for requests |
protected javax.jms.Destination |
validateDestination(javax.jms.Destination destination)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OneWayRequestor(JmsProducerConfig config,
javax.jms.Destination serverDestination)
throws javax.jms.JMSException
javax.jms.JMSException
public OneWayRequestor(javax.jms.Connection connection,
javax.jms.Session session,
javax.jms.MessageProducer producer,
javax.jms.Destination serverDestination,
boolean ownsConnection)
| Method Detail |
|---|
public static OneWayRequestor newInstance(javax.jms.Connection connection,
JmsProducerConfig config,
boolean ownsConnection)
throws javax.jms.JMSException
javax.jms.JMSException
public void close()
throws javax.jms.JMSException
RequestorRequestor 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 Requestorjavax.jms.JMSException - if the JMS provider fails to close the Requestor
due to some internal error.
public void destroy()
throws java.lang.Exception
destroy in interface org.springframework.beans.factory.DisposableBeanjava.lang.Exception
public void send(javax.jms.Destination destination,
javax.jms.Message message)
throws javax.jms.JMSException
Requestor
send in interface Requestordestination - the server side destinationmessage - the message to send
javax.jms.JMSException
public void send(javax.jms.Destination destination,
javax.jms.Message message,
long timeToLive)
throws javax.jms.JMSException
javax.jms.JMSException
public void send(javax.jms.Destination destination,
javax.jms.Message message,
int deliveryMode,
int priority,
long timeToLive)
throws javax.jms.JMSException
RequestorMessageProducer
send in interface Requestorjavax.jms.JMSException - if the message could not be sent
public javax.jms.Message receive(long timeout)
throws javax.jms.JMSException
Requestor
receive in interface Requestorjavax.jms.JMSException
public javax.jms.Message request(javax.jms.Destination destination,
javax.jms.Message message)
throws javax.jms.JMSException
RequestorJMSReplyTo destination, and only one reply per request
is expected.
request in interface Requestordestination - the server side destinationmessage - the message to send
javax.jms.JMSException - if the JMS provider fails to complete the request due to some
internal error.
public javax.jms.Message request(javax.jms.Destination destination,
javax.jms.Message message,
long timeout)
throws javax.jms.JMSException
RequestorJMSReplyTo destination,
and only one reply per request is expected.
request in interface Requestordestination - the server side destinationmessage - the message to send
javax.jms.JMSException - if the JMS provider fails to complete the request due to some
internal error.
public void request(javax.jms.Destination destination,
javax.jms.Message requestMessage,
ReplyHandler handler,
long timeout)
throws javax.jms.JMSException
Requestor
request in interface Requestorjavax.jms.JMSExceptionpublic javax.jms.Connection getConnection()
Requestor
getConnection in interface Requestorpublic javax.jms.Session getSession()
Requestor
getSession in interface Requestorpublic javax.jms.MessageProducer getMessageProducer()
Requestor
getMessageProducer in interface Requestor
public int getDeliveryMode()
throws javax.jms.JMSException
javax.jms.JMSException
public void setDeliveryMode(int deliveryMode)
throws javax.jms.JMSException
javax.jms.JMSException
public int getPriority()
throws javax.jms.JMSException
javax.jms.JMSException
public void setPriority(int priority)
throws javax.jms.JMSException
javax.jms.JMSException
public long getTimeToLive()
throws javax.jms.JMSException
javax.jms.JMSException
public void setTimeToLive(long timeToLive)
throws javax.jms.JMSException
javax.jms.JMSException
protected void populateHeaders(javax.jms.Message message)
throws javax.jms.JMSException
javax.jms.JMSException
protected void doSend(javax.jms.Destination destination,
javax.jms.Message message,
long timeToLive)
throws javax.jms.JMSException
javax.jms.JMSException
protected void doSend(javax.jms.Destination destination,
javax.jms.Message message,
int deliveryMode,
int priority,
long timeToLive)
throws javax.jms.JMSException
javax.jms.JMSExceptionprotected javax.jms.Destination validateDestination(javax.jms.Destination destination)
public java.lang.String createCorrelationID()
createCorrelationID in interface Requestorprotected long nextCounter()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||