Skip to Main Content
Professional Cairngorm™
book

Professional Cairngorm™

by Jeremy Wischusen
November 2009
Intermediate to advanced content levelIntermediate to advanced
357 pages
8h 20m
English
Wrox
Content preview from Professional Cairngorm™

28.2. Notifying Callers

Many of the improvements made in the Cairngorm Extensions center on using the mx.rpc.IResponder interface to respond to asynchronous calls.

The typical method of handling a remote service call in Cairngorm can be seen in (Figure 28-1).

Figure 28.1. Figure 28-1

In this scenario, only the command class responds to the asynchronous call. This class then must update the ModelLocator to notify the rest of the application of any changes resulting from the call.

The Cairngorm Extension modifies this process, as shown in (Figure 28-2).

Figure 28.2. Figure 28-2

In the Cairngorm Extensions system, the async response is sent back to the delegate class. When the delegate receives this response, each calling class notifies its calling class of the response, forming a chain of responders potentially reaching back to the component that dispatched the event. The result of this system is that classes, including views, can now respond to async calls by registering as responders.

You saw examples of the basic principles underlying this process when you used the mx.rpc.Responder class in Chapter 23. In the Cairngorm Extensions, the responder methodology is actually built into the extensions. The extensions implement this responder methodology as follows:

Notifications are ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Professional Java® JDK®, 6th Edition

Professional Java® JDK®, 6th Edition

W. Clay Richardson, Jeff Scanlon, Donald Avondolio, Mark W. Mitchell, Scot Schrager

Publisher Resources

ISBN: 9780470497265Purchase book