To get a feel for all the features of the FAST API,
I'm applying it to the Cairngorm login sample that ships with
architecture. I'm assuming the ServiceLocator will no longer be needed
since it will be replaced with the ProxyFactory, which implies the
following code snippet:

<s:ProxyFactory xmlns:mx="http://www.macromedia.com/2003/mxml";
xmlns:s="fast.services.*" debug="true">

    <mx:RemoteObject id="customerDelegate"
                named="customerServiceImpl"
                protocol="http"
                showBusyCursor="true"
                result="resultHandler( event )"
                fault="faultHandler( event )">
    </mx:RemoteObject>

</s:ProxyFactory>


---------------------

And for the Business Delegate the following changes are required:

import org.nevis.cairngorm.business.Responder;
//import org.nevis.cairngorm.business.ServiceLocator;
import org.nevis.cairngorm.samples.login.business.Services;
import org.nevis.cairngorm.samples.login.vo.LoginVO;
import mx.utils.Delegate;
import fast.echo.Echo;
import fast.services.ProxyFactory;
import fast.services.Proxy;

class org.nevis.cairngorm.samples.login.business.CustomerDelegate
{
   private var proxy:Proxy;

   public function CustomerDelegate( responder : Responder )
   {
    //this.service =
ServiceLocator.getInstance().getService("customerDelegate" );
                 this.proxy = ProxyFactory.getProxy("customerDelegate");
                 this.responder = responder;
         }

//------------------------------------------------------------

         public function login( loginVO : LoginVO ): Void
         {

                 var call = proxy.invoke("login",     //remote method/operation
                       responder,       //local reply object
                       responder.onResult,     //local reply destination
                       loginVO);   //remote method inputs
                 
                 /*var call = service.login( loginVO );
                 call.resultHandler = Delegate.create( responder, 
responder.onResult );
                 call.faultHandler = Delegate.create( responder, 
responder.onFault );*/
         }

//-------------------------------------------------------------

         private var responder:Responder;
         private var service:Object;
}


In the LoginCommand onResult handler, we can then handle faults and
sucess results. Any insight?

Thanks,
Sof





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to