3.2. What Does It Look Like?

The classes and interfaces associated with the ServiceLocator are found in the com.adobe.cairngorm.business package (http://cairngormdocs.org/docs/cairngorm_2_2_1/com/adobe/cairngorm/business/package-detail.html). The following classes and interfaces are found in this package:

  • Interfaces

    • IServiceLocator: Defines an interface for the service locator

    • IServices: Defines an interface for managing services on an IServiceLocator

    • Responder: Implemented by classes that wish to handle data returned as the result of a service call to the server. Deprecated as of Cairngorm 2.1 and replaced by mx.rpc.IResponder

  • Classes

    • AbstractServices: Used to manage all services defined on the IServiceLocator instance

    • ServiceLocator: Allows services to be located and security credentials to be managed

In the sections that follow you will take a closer look at each of these classes and interfaces, as well as some classes found in the source code that are not included in the documentation.

3.2.1. IServiceLocator

This interface provides the basic method signatures for retrieving the various types of services that can be registered. The code for this interface is as follows:

package com.adobe.cairngorm.business { import mx.messaging.MessageAgent; import mx.rpc.AbstractService; import mx.rpc.http.HTTPService; import mx.rpc.remoting.RemoteObject; import mx.rpc.soap.WebService; public interface IServiceLocator { function getHTTPService( serviceId : String ) : HTTPService; function getRemoteObject( ...

Get Professional Cairngorm™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.