Deprecated, replaced by mx.rpc.IResponder.

The Responder interface is implemented by classes that wish to handle data returned as the result of a service-call to the server.

Typically, a server-side call will be made using a service that is defined on the ServiceLocator. These services will either be remote calls onto Java Objects (RemoteObject), Web Service invocations (WebService) or XML over HTTP/HTTPS (HTTPService) service calls.

The results from these server calls will be handled by an object that has been passed to the ServiceLocator as the designated "responder" (the class willing to handle the response).

Typically in the Cairngorm architecture, the Responder interface is implemented by a concrete implementation of an ICommand class that will use a BusinessDelegate class to handle invocation of server-side business logic.

See also:

Methods

@:value({ event : null })@:meta(Deprecated(replacement = "mx.rpc.IResponder.fault"))onFault(?event:Dynamic):Void

Deprecated: "mx.rpc.IResponder.fault"

The onFault method interface is used to mark the method on a concrete Responder that will handle the information from a failed call to a server-side service. The actual data returned will be held in the event.

Parameters:

event

An object containing the data passed back from the service call

@:value({ event : null })@:meta(Deprecated(replacement = "mx.rpc.IResponder.result"))onResult(?event:Dynamic):Void

Deprecated: "mx.rpc.IResponder.result"

The onResult method interface is used to mark the method on a concrete Responder that will handle the results from a successful call to a server-side service. The actual data returned will be held in the event.

Parameters:

event

An object containing the data passed back from the service call, it is recommended that this be immediately narrowed within the concrete responder by using an appropriate cast. For instance, if you invoke a Java method that returns an AccountVO value object, cast event.result to an AccountVO as follows:

var customerAccount:AccountVO = AccountVO(event.result);

It is considered good practice when building applications with the Cairngorm framework, to indicate the return types from the server by appropriate casting. Java Developers should take care not to use the Java casting notation - a common mistake for RIA developers migrating from J2EE development.