first implementation of Cairngorm

This commit is contained in:
2025-11-17 14:29:12 +01:00
parent 99f8c52d50
commit 5e869c96a5
10 changed files with 498 additions and 3 deletions
+24
View File
@@ -0,0 +1,24 @@
package business;
import com.adobe.cairngorm.business.ServiceLocator;
import feathers.rpc.IResponder;
import feathers.rpc.http.HTTPService;
class LoadRidersDelegate {
private var command:IResponder;
private var service:HTTPService;
public function new(command:IResponder) {
// constructor will store a reference to the service we're going to call
service = ServiceLocator.getInstance().getHTTPService('loadRidersService');
// and store a reference to the command that created this delegate
this.command = command;
}
public function loadRidersService():Void {
// call the service
var token = service.send();
// notify this command when the service call completes
token.addResponder(command);
}
}
+15
View File
@@ -0,0 +1,15 @@
package business;
import com.adobe.cairngorm.business.ServiceLocator;
import feathers.rpc.http.HTTPService;
class Services extends ServiceLocator {
public var loadRidersService:HTTPService;
public function new() {
super();
loadRidersService = new HTTPService();
loadRidersService.url = "data/riders.json";
loadRidersService.resultFormat = HTTPService.RESULT_FORMAT_JSON;
}
}