|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.wsif.util.jms.WSIFJMSDestination
A WSIFJMSDestination is a pair of queues, one that read from and the other that is written to. This class provides various methods for different flavours of reading and writing messages to those queues. This class hides the JMS interface.
Constructor Summary | |
---|---|
WSIFJMSDestination(WSIFJMSFinder finder)
Public constructor. |
|
WSIFJMSDestination(WSIFJMSFinder finder,
long timeout)
Public constructor. |
|
WSIFJMSDestination(WSIFJMSFinder finder,
java.lang.String altDestName,
long timeout)
Public constructor. |
Method Summary | |
---|---|
void |
close()
Close all objects. |
javax.jms.Message |
createMessage(int msgType)
|
static javax.jms.Message |
createMessage(javax.jms.Session session,
int msgType)
|
java.lang.String |
deep()
|
void |
finalize()
close the destination at finalize. |
java.util.HashMap |
getProperties()
Gets all the JMS properties from the previous message that was received. |
java.lang.Object |
getProperty(java.lang.String name)
Gets a JMS property from the previous message that was received. |
java.lang.String |
receive()
Blocking receive for the wsif.syncrequest.timeout |
javax.jms.Message |
receive(java.lang.String id)
Blocking receive waits for a message for the wsif.syncrequest.timeout |
javax.jms.Message |
receive(java.lang.String id,
long timeout)
Blocking receive waits for a message for the specified timeout |
java.lang.String |
receiveString(java.lang.String id)
Blocking receive for the wsif.syncrequest.timeout |
java.lang.String |
receiveString(java.lang.String id,
long timeout)
Blocking receive waits for the specified timeout |
java.lang.String |
send(javax.jms.Message msg,
java.lang.String id,
boolean setReplyTo)
Sends a message to the write queue. |
java.lang.String |
send(java.io.Serializable data)
Send a message to the write queue |
java.lang.String |
send(java.io.Serializable data,
java.lang.String id)
Send a message to the write queue |
java.lang.String |
send(java.lang.String data)
Send a message to the write queue |
java.lang.String |
send(java.lang.String data,
java.lang.String id)
Send a message to the write queue |
void |
setAsyncMode(boolean b)
Sets if this destination is to be used for asynchronous requests. |
void |
setProperties(java.util.HashMap propMap)
Sets a HashMap of JMS property value pairs. |
void |
setProperty(java.lang.String name,
java.lang.Object value)
Sets a JMS property to a value. |
void |
setReplyToQueue()
Set the replyTo queue to a temporary queue. |
void |
setReplyToQueue(java.lang.String replyTo)
Set the replyTo queue. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public WSIFJMSDestination(WSIFJMSFinder finder) throws WSIFException
finder
- used to find JMS objects.public WSIFJMSDestination(WSIFJMSFinder finder, long timeout) throws WSIFException
finder
- used to find JMS objects.timeout
- is the maximum time to wait on a synchronous receivepublic WSIFJMSDestination(WSIFJMSFinder finder, java.lang.String altDestName, long timeout) throws WSIFException
finder
- used to find JMS objects.altdestName
- is an alterative JMS provider destination nametimeout
- is the maximum time to wait on a synchronous receiveMethod Detail |
public void close() throws WSIFException
public void finalize() throws WSIFException
public java.lang.String send(java.lang.String data) throws WSIFException
data
- is the messagepublic java.lang.String send(java.lang.String data, java.lang.String id) throws WSIFException
data
- is the messageid
- is the correlation id to set on the messagepublic java.lang.String send(java.io.Serializable data) throws WSIFException
data
- is the messagepublic java.lang.String send(java.io.Serializable data, java.lang.String id) throws WSIFException
data
- is the messageid
- is the correlation id to set on the messagepublic java.lang.String send(javax.jms.Message msg, java.lang.String id, boolean setReplyTo) throws WSIFException
message
- id
- Correlation idsetReplyTo
- If true JMSReplyTo is always set. If false JMSReplyTo
is only set if the ReplyTo was explicitly set as a
property.public java.lang.String receive() throws WSIFException
public java.lang.String receiveString(java.lang.String id) throws WSIFException
public java.lang.String receiveString(java.lang.String id, long timeout) throws WSIFException
public javax.jms.Message receive(java.lang.String id) throws WSIFException
id
- is the correlation id that the received message must havepublic javax.jms.Message receive(java.lang.String id, long timeout) throws WSIFException
id
- is the correlation id that the received message must havetimeout
- how long in milliseconds to waitpublic void setReplyToQueue() throws WSIFException
public void setReplyToQueue(java.lang.String replyTo) throws WSIFException
replyTo
- queue name.public void setAsyncMode(boolean b) throws WSIFException
b
- true if this destination is to be used for asynchronous requests,
otherwise false.public void setProperty(java.lang.String name, java.lang.Object value) throws WSIFException
public void setProperties(java.util.HashMap propMap)
public java.lang.Object getProperty(java.lang.String name) throws WSIFException
public java.util.HashMap getProperties() throws WSIFException
public static javax.jms.Message createMessage(javax.jms.Session session, int msgType) throws WSIFException
public javax.jms.Message createMessage(int msgType) throws WSIFException
public java.lang.String deep()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |