Packageorg.restfulx.services.amf
Classpublic class AMFServiceProvider
InheritanceAMFServiceProvider Inheritance XMLHTTPServiceProvider

AMF (over HTTP) based Service Provider



Public Properties
 PropertyDefined by
  id : int
[read-only] ID uniquely identifies this service provider.
AMFServiceProvider
 InheritedrootUrl : String
Root URL that this service provider will prefix to all requests.
XMLHTTPServiceProvider
Protected Properties
 PropertyDefined by
 Inheritedserializer : ISerializer
XMLHTTPServiceProvider
 Inheritedstate : ModelsMetadata
XMLHTTPServiceProvider
 InheritedurlSuffix : String
XMLHTTPServiceProvider
Public Methods
 MethodDefined by
  
AMFServiceProvider(amfGatewayUrl:String = null)
AMFServiceProvider
  
canLazyLoad():Boolean
Indicates if this service provider can perform lazy loading.
AMFServiceProvider
 Inherited
create(object:Object, responder:IResponder, metadata:Object = null, nestedBy:Array = null, recursive:Boolean = false, undoRedoFlag:int = 0):void
RESTful CRUD contract: create method.
XMLHTTPServiceProvider
 Inherited
destroy(object:Object, responder:IResponder, metadata:Object = null, nestedBy:Array = null, recursive:Boolean = false, undoRedoFlag:int = 0):void
RESTful CRUD contract: destroy method.
XMLHTTPServiceProvider
  
hasErrors(object:Object):Boolean
Indicates to the ServiceResponder that this particular run (typically create/update or destroy) has produced errors.
AMFServiceProvider
 Inherited
index(object:Object, responder:IResponder, metadata:Object = null, nestedBy:Array = null):void
RESTful CRUD contract: index method.
XMLHTTPServiceProvider
  
marshall(object:Object, recursive:Boolean = false):Object
Produces service provider specific model representation suitable for being serialized.
AMFServiceProvider
 Inherited
show(object:Object, responder:IResponder, metadata:Object = null, nestedBy:Array = null):void
RESTful CRUD contract: show method.
XMLHTTPServiceProvider
  
unmarshall(object:Object, disconnected:Boolean = false, defaultType:String = null):Object
The reverse of marshall.
AMFServiceProvider
 Inherited
update(object:Object, responder:IResponder, metadata:Object = null, nestedBy:Array = null, recursive:Boolean = false, undoRedoFlag:int = 0):void
RESTful CRUD contract: update method.
XMLHTTPServiceProvider
Protected Methods
 MethodDefined by
 Inherited
addHeaders(request:URLRequest, headers:Object):void
XMLHTTPServiceProvider
  
decodeResult(result:Object):Object
AMFServiceProvider
  
getURLLoader():URLLoader
AMFServiceProvider
 Inherited
getURLRequest(object:Object, nestedBy:Array = null):URLRequest
XMLHTTPServiceProvider
 Inherited
invokeCreateOrUpdateURLRequest(request:URLRequest, responder:IResponder, object:Object, metadata:Object = null, nestedBy:Array = null, recursive:Boolean = false, undoRedoFlag:int = 0, creating:Boolean = false):void
XMLHTTPServiceProvider
 Inherited
invokeMultiPartRequest(request:URLRequest, object:Object, responder:IResponder, metadata:Object = null, nestedBy:Array = null, recursive:Boolean = false, undoRedoFlag:int = 0, creating:Boolean = false):void
XMLHTTPServiceProvider
 Inherited
invokeURLRequest(request:URLRequest, responder:IResponder):void
XMLHTTPServiceProvider
 Inherited
marshallToURLVariables(source:Object):URLVariables
XMLHTTPServiceProvider
 Inherited
marshallToVO(object:Object, recursive:Boolean = false, toDelete:Boolean = false):Object
XMLHTTPServiceProvider
 Inherited
sendOrUpload(request:URLRequest, object:Object, responder:IResponder, metadata:Object = null, nestedBy:Array = null, recursive:Boolean = false, undoRedoFlag:int = 0, creating:Boolean = false):void
XMLHTTPServiceProvider
 Inherited
uploadFile(request:URLRequest, object:Object, responder:IResponder, metadata:Object = null, nestedBy:Array = null, recursive:Boolean = false, undoRedoFlag:int = 0, creating:Boolean = false):void
XMLHTTPServiceProvider
 Inherited
urlEncodeMetadata(metadata:Object = null):String
XMLHTTPServiceProvider
Public Constants
 ConstantDefined by
  ID : int
[static] service id
AMFServiceProvider
Property detail
idproperty
id:int  [read-only]

ID uniquely identifies this service provider. This is typically obtained from ServiceManager like so: public static const ID:int = ServiceManager.generateId(); You can then wrap around this with a getter: public function get id():int { return ID; }

Implementation
    public function get id():int

See also

Constructor detail
AMFServiceProvider()constructor
public function AMFServiceProvider(amfGatewayUrl:String = null)

Parameters
amfGatewayUrl:String (default = null) — root URL that this service provider will prefix to all requests. By default this will be equal to Rx.httpRootUrl parameter
Method detail
canLazyLoad()method
public override function canLazyLoad():Boolean

Indicates if this service provider can perform lazy loading. RxModelsController will then skip pre-fetching of the lazy dependencies and it's the responsibility of the provider to make sure that the data that was requested is loaded (perhaps via nesting, etc).

Returns
Boolean — true if the service provider can lazy load, false otherwise

See also

decodeResult()method 
protected override function decodeResult(result:Object):ObjectParameters
result:Object

Returns
Object
getURLLoader()method 
protected override function getURLLoader():URLLoader

Returns
URLLoader
hasErrors()method 
public override function hasErrors(object:Object):Boolean

Indicates to the ServiceResponder that this particular run (typically create/update or destroy) has produced errors. This typically means that response processing must be terminated and instead errors should be displayed.

Parameters
object:Object — the response object being processed

Returns
Boolean — true if there are errors false otherwise

See also

marshall()method 
public override function marshall(object:Object, recursive:Boolean = false):Object

Produces service provider specific model representation suitable for being serialized. For example, XMLHTTPServiceProvider would return XML.

Parameters
object:Object — object to marshall into serialized form
 
recursive:Boolean (default = false) — flag indicating if entire object graph should be serialized inline

Returns
Object

See also

unmarshall()method 
public override function unmarshall(object:Object, disconnected:Boolean = false, defaultType:String = null):Object

The reverse of marshall. Takes a response from the underlying service provider and turns it into an object graph of models.

Parameters
object:Object — source object from the service provider/responder
 
disconnected:Boolean (default = false) — a flag indicating that the object should not be reconnected with the cache
 
defaultType:String (default = null) — default type to use if the type cannot be determined by the serializer

Returns
Object — (dis)connected object graph of the model corresponding to the response

See also

Constant detail
IDconstant
public static const ID:int

service id