Constructor and Description |
---|
ReplyHandler(ReplyCallback replyCallback,
Reply reply)
Creates a new ReplyHandler.
|
ReplyHandler(ReplyCallback replyCallback,
Throwable exception)
Creates a new ReplyHandler.
|
Modifier and Type | Method and Description |
---|---|
static void |
raiseError(Throwable exception,
ReplyCallback replyCallback,
Executor executor)
Raise an error on the callback, if any.
|
static void |
reply(Receiver receiver,
Reply reply,
ReplyCallback replyCallback,
Executor executor)
Updates to set the reply for the callback, if any.
|
void |
run() |
static void |
tryReceive()
If there is a pending reply tries to process that reply.
|
public ReplyHandler(ReplyCallback replyCallback, Reply reply)
replyCallback
- The callback for the message.reply
- The reply.public ReplyHandler(ReplyCallback replyCallback, Throwable exception)
replyCallback
- The callback for the message.exception
- The thrown exception.public static void raiseError(Throwable exception, ReplyCallback replyCallback, Executor executor)
exception
- The thrown exception.replyCallback
- The callback for the reply to the message.executor
- The executor to use for the back-grounding the reply handling.public static void reply(Receiver receiver, Reply reply, ReplyCallback replyCallback, Executor executor)
receiver
- The socket receiving the message.reply
- The reply.replyCallback
- The callback for the reply to the message.executor
- The executor to use for the back-grounding the reply handling.public static void tryReceive()
Copyright © 2011–2014 Allanbank Consulting, Inc.. All rights reserved.