|
xmlBlaster 1.6.2 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.xmlBlaster.jms.XBMessageConsumer
XBMessageConsumer
| Field Summary | |
protected javax.jms.Destination |
destination
|
protected javax.jms.ExceptionListener |
exceptionListener
|
protected Global |
global
|
private static java.util.logging.Logger |
log
|
private java.lang.String |
ME
|
protected javax.jms.Message |
msg
|
protected javax.jms.MessageListener |
msgListener
|
protected java.lang.String |
msgSelector
|
protected boolean |
noLocal
|
protected boolean |
open
|
protected XBSession |
session
|
protected SubscribeReturnQos |
subscribeReturnQos
|
| Constructor Summary | |
(package private) |
XBMessageConsumer(XBSession session,
javax.jms.Destination destination,
java.lang.String msgSelector,
boolean noLocal)
For each consumer created, an own xmlBlaster subscription is done since the msgSelector (i.e. |
| Method Summary | |
protected void |
checkIfOpen(java.lang.String methodName)
|
void |
close()
unsubscribe here |
javax.jms.MessageListener |
getMessageListener()
|
java.lang.String |
getMessageSelector()
|
private java.lang.String |
getOid(javax.jms.Destination destination)
|
javax.jms.Message |
receive()
|
javax.jms.Message |
receive(long delay)
|
javax.jms.Message |
receiveNoWait()
Currently the implementation is such that if no msgListener has been associated to this consumer, the onMessage blocks until receiveNoWait has been invoked (if there is a message pending). |
void |
setMessageListener(javax.jms.MessageListener msgListener)
|
private SubscribeReturnQos |
subscribe(javax.jms.Destination destination,
java.lang.String msgSelector,
boolean noLocal)
|
java.lang.String |
update(java.lang.String cbSessionId,
UpdateKey updateKey,
byte[] content,
UpdateQos updateQos)
This is the callback method invoked from I_XmlBlasterAccess informing the client in an asynchronous mode about a new message. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private java.lang.String ME
protected Global global
private static java.util.logging.Logger log
protected java.lang.String msgSelector
protected javax.jms.MessageListener msgListener
protected XBSession session
protected javax.jms.Message msg
protected SubscribeReturnQos subscribeReturnQos
protected javax.jms.Destination destination
protected boolean noLocal
protected javax.jms.ExceptionListener exceptionListener
protected boolean open
| Constructor Detail |
XBMessageConsumer(XBSession session,
javax.jms.Destination destination,
java.lang.String msgSelector,
boolean noLocal)
throws javax.jms.JMSException
| Method Detail |
protected final void checkIfOpen(java.lang.String methodName)
throws javax.jms.JMSException
javax.jms.JMSException
private final java.lang.String getOid(javax.jms.Destination destination)
throws javax.jms.JMSException
javax.jms.JMSException
private final SubscribeReturnQos subscribe(javax.jms.Destination destination,
java.lang.String msgSelector,
boolean noLocal)
throws javax.jms.JMSException
javax.jms.JMSException
public void close()
throws javax.jms.JMSException
close in interface javax.jms.MessageConsumerjavax.jms.JMSException
public javax.jms.MessageListener getMessageListener()
throws javax.jms.JMSException
getMessageListener in interface javax.jms.MessageConsumerjavax.jms.JMSException
public java.lang.String getMessageSelector()
throws javax.jms.JMSException
getMessageSelector in interface javax.jms.MessageConsumerjavax.jms.JMSException
public javax.jms.Message receive()
throws javax.jms.JMSException
receive in interface javax.jms.MessageConsumerjavax.jms.JMSException
public javax.jms.Message receive(long delay)
throws javax.jms.JMSException
receive in interface javax.jms.MessageConsumerjavax.jms.JMSException
public javax.jms.Message receiveNoWait()
throws javax.jms.JMSException
receiveNoWait in interface javax.jms.MessageConsumerjavax.jms.JMSException
public void setMessageListener(javax.jms.MessageListener msgListener)
throws javax.jms.JMSException
setMessageListener in interface javax.jms.MessageConsumerjavax.jms.JMSException
public java.lang.String update(java.lang.String cbSessionId,
UpdateKey updateKey,
byte[] content,
UpdateQos updateQos)
throws XmlBlasterException
I_Callback
update in interface I_CallbackcbSessionId - The session ID specified by the client which registered the callback.
You can specify a cbSessionId during connection (with ConnectQos)
and this is bounced back here so you can authenticate the message.updateKey - The arrived key containing the topic namecontent - The arrived message content. This is your payload.
XmlBlasterExceptionI_XmlBlasterAccess
|
xmlBlaster 1.6.2 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||