|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object raccoon.tibco.tibrv.endpoint.TibrvCallback
public class TibrvCallback
Implementation class invoked each time an event arrives on the bus.
Constructor Summary | |
---|---|
TibrvCallback()
|
Method Summary | |
---|---|
void |
addEventHandler(IEventHandler pNewHandler)
Adds a new event handler to this listener. |
long |
getNbMsgReceived()
The number of messages received by this callback. |
void |
onMsg(com.tibco.tibrv.TibrvListener pRvListener,
com.tibco.tibrv.TibrvMsg pRvMsg)
The callback method to be implemented in order to receive messages from the TIB. |
IEventHandler |
removeEventHandler(java.lang.String pHandlerName)
Removes a given event handler from the current session. |
void |
stop()
Stops all event handlers and clears the list of event handlers. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TibrvCallback()
Method Detail |
---|
public long getNbMsgReceived()
public void onMsg(com.tibco.tibrv.TibrvListener pRvListener, com.tibco.tibrv.TibrvMsg pRvMsg)
This method is invoked each time and inbound event arrives, regardless of the quality of service.
If the QoS is certified messaging than further information regarding the sender can be retrieved using
getSender
, additional information regarding the sequence id can be
obtained using getSequence
.
If the sequence id is zero than it means that there is no certified delivery agreement between the sender and
the receiver. This occurs when the QoS isn't RvCM
or RvCMQ
or this subscribing hasn't
been registered at the sender level.
Refer to TibrvCmListener
in order to understand how to create a Certified receiver.
onMsg
in interface com.tibco.tibrv.TibrvMsgCallback
pRvListener
- the rv listener instance that is subscribed to the received rv msgpRvMsg
- the rv msg received by the TIB that is to be handled.public void addEventHandler(IEventHandler pNewHandler) throws java.lang.IllegalArgumentException
pNewHandler
- the handler that is supposed to receive a message each time.
java.lang.IllegalArgumentException
- if the handler is null.
java.lang.IllegalArgumentException
- if the handler name is null.
java.lang.IllegalArgumentException
- if the handler has already been added to this callback.public IEventHandler removeEventHandler(java.lang.String pHandlerName)
pHandlerName
- the name of the handler to remove.
null
if not found.public void stop() throws RaccoonException
RaccoonException
- if the one or more handlers failed to halt.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |