Package com.yahoo.feedapi
Class SharedSender
java.lang.Object
com.yahoo.feedapi.SharedSender
- All Implemented Interfaces:
com.yahoo.messagebus.ReplyHandler
This class allows multiple clients to use one shared messagebus session.
The user should create a ResultCallback, which acts as a "session" for that
client, and send one or more messages using the send() methods.
When done sending messages, the client can wait for all messages to be replied to
using the waitForPending method.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static interface
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
handleReply
(com.yahoo.messagebus.Reply r) Implement replyHandler from messagebus.void
send
(com.yahoo.messagebus.Message msg, SharedSender.ResultCallback owner) Sends a messagevoid
send
(com.yahoo.messagebus.Message msg, SharedSender.ResultCallback owner, boolean blockingQueue) Sends a message.void
shutdown()
-
Field Details
-
log
-
-
Method Details
-
getMetrics
-
shutdown
public void shutdown() -
handleReply
public void handleReply(com.yahoo.messagebus.Reply r) Implement replyHandler from messagebus. Called when a reply is received from messagebus. Tries to find the callback from the reply context and updates the pending state for the callback.- Specified by:
handleReply
in interfacecom.yahoo.messagebus.ReplyHandler
- Parameters:
r
- the reply to process.
-