class MessageResponder
package feathers.messaging
extends Responder
extended by AuthenticationMessageResponder
The MessageResponder class handles a successful result or fault from a message
destination. For each message that a Channel sends, the Channel creates a
MessageResponder to handle the result. Upon a response, the Channel will
invoke either the result()
or status()
callback
on the MessageResponder. MessageResponder subclasses should override these
methods to perform any necessary processing. For every response, whether a
successful result or an error, the MessageResponder should invoke
acknowledge()
on its agent. If the response was a fault, the
MessageResponder should also invoke fault()
on its agent.
Constructor
new(agent:MessageAgent, message:IMessage, ?channel:Channel)
Constructs a MessageResponder to handle the response for the specified Message for the specified MessageAgent.
Parameters:
agent | The MessageAgent sending the Message. |
---|---|
message | The Message being sent. |
channel | The Channel used to send. |
Variables
Methods
finalresult(message:IMessage):Void
Called by the channel that created this MessageResponder when a
response returns from the destination.
This method performs core result processing and then invokes the
resultHandler()
method that subclasses may override to
perform any necessary custom processing.
Parameters:
message | The result Message returned by the destination. |
---|
finalstartRequestTimeout(requestTimeout:Int):Void
Starts a timer to monitor a request timeout. If the timer hits the
specified requestTimeout before a response is returned,
requestTimedOut()
is invoked and any subsequent
response is ignored by this responder.
Parameters:
requestTimeout | The amount of time in seconds to allow a request to run before timing it out. |
---|
finalstatus(message:IMessage):Void
Called by the channel that created this MessageResponder when a fault
response returns from the destination.
This method performs core result processing and then invokes the
statusHandler()
method that subclasses may override to
perform any necessary custom processing.
Parameters:
message | The fault Message returned by the destination. |
---|