Pacotemx.messaging
Classepublic class MessageResponder
HerançaMessageResponder Inheritance Responder Inheritance Object

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.



Propriedades Públicas
 PropriedadeDefinido por
  agent : MessageAgent
[read-only] Provides access to the MessageAgent that sent the message.
MessageResponder
  channel : Channel
[read-only] Provides access to the Channel used to send the message.
MessageResponder
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
  message : IMessage
Provides access to the sent Message.
MessageResponder
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
Métodos Públicos
 MétodoDefinido por
  
MessageResponder(agent:MessageAgent, message:IMessage, channel:Channel = null)
Constructs a MessageResponder to handle the response for the specified Message for the specified MessageAgent.
MessageResponder
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
  
result(message:IMessage):void
Called by the channel that created this MessageResponder when a response returns from the destination.
MessageResponder
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
  
status(message:IMessage):void
Called by the channel that created this MessageResponder when a fault response returns from the destination.
MessageResponder
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
Métodos Protegidos
 MétodoDefinido por
  
Constructs an ErrorMessage that can be passed to the associated MessageAgent's callbacks upon a request timeout.
MessageResponder
  
Subclasses must override this method to handle a request timeout and invoke the proper callbacks on the associated MessageAgent.
MessageResponder
  
Subclasses must override this method to perform custom processing of the result and invoke the proper callbacks on the associated MessageAgent.
MessageResponder
  
Subclasses must override this method to perform custom processing of the status and invoke the proper callbacks on the associated MessageAgent.
MessageResponder
Detalhes da propriedade
agentpropriedade
agent:MessageAgent  [read-only]

Provides access to the MessageAgent that sent the message.


Implementação
    public function get agent():MessageAgent
channelpropriedade 
channel:Channel  [read-only]

Provides access to the Channel used to send the message.


Implementação
    public function get channel():Channel
messagepropriedade 
message:IMessage  [read-write]

Provides access to the sent Message.


Implementação
    public function get message():IMessage
    public function set message(value:IMessage):void
Detalhes do construtor
MessageResponder()Construtor
public function MessageResponder(agent:MessageAgent, message:IMessage, channel:Channel = null)

Constructs a MessageResponder to handle the response for the specified Message for the specified MessageAgent.

Parâmetros
agent:MessageAgent — agent The MessageAgent sending the Message.
 
message:IMessage — message The Message being sent.
 
channel:Channel (default = null) — The Channel used to send.
Detalhes do método
createRequestTimeoutErrorMessage()método
protected function createRequestTimeoutErrorMessage():ErrorMessage

Constructs an ErrorMessage that can be passed to the associated MessageAgent's callbacks upon a request timeout.

Retorna
ErrorMessage
requestTimedOut()método 
protected function requestTimedOut():void

Subclasses must override this method to handle a request timeout and invoke the proper callbacks on the associated MessageAgent.

result()método 
public final function result(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.

Parâmetros

message:IMessage — The result Message returned by the destination.

resultHandler()método 
protected function resultHandler(message:IMessage):void

Subclasses must override this method to perform custom processing of the result and invoke the proper callbacks on the associated MessageAgent.

Parâmetros

message:IMessage — The result Message returned by the destination.

status()método 
public final function status(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.

Parâmetros

message:IMessage — The fault Message returned by the destination.

statusHandler()método 
protected function statusHandler(message:IMessage):void

Subclasses must override this method to perform custom processing of the status and invoke the proper callbacks on the associated MessageAgent.

Parâmetros

message:IMessage — The fault Message returned by the destination.