패키지 | mx.rpc.http |
클래스 | public class Operation |
상속 | Operation AbstractOperation AbstractOperation AbstractInvoker EventDispatcher Object |
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
send(param1, param2)
method. HTTP services also support a sendBody
method which allows you to directly specify the body of the HTTP response. If you use the
send(param1, param2) method, the body is typically formed by combining the argumentNames
property of the operation with the parameters sent. An Object is created which uses the
argumentNames[i] as the key and the corresponding parameter as the value.
The exact way in which the HTTP operation arguments is put into the HTTP body is determined by the serializationFilter used.
속성 | 정의 주체 | ||
---|---|---|---|
argumentNames : Array
An ordered list of the names of the arguments to pass to a method invocation. | AbstractOperation | ||
arguments : Object
The arguments to pass to the Operation when it is invoked. | AbstractOperation | ||
concurrency : String [재정의]
Value that indicates how to handle multiple calls to the same service operation. | Operation | ||
constructor : Object
지정된 객체 인스턴스의 클래스 객체 또는 생성자 함수에 대한 참조입니다. | Object | ||
contentType : String [재정의]
Type of content for service requests. | Operation | ||
headers : Object
Custom HTTP headers to be sent to the third party endpoint. | AbstractOperation | ||
lastResult : Object [읽기 전용]
The result of the last invocation. | AbstractInvoker | ||
makeObjectsBindable : Boolean [재정의]
When this value is true, anonymous objects returned are forced to bindable objects. | Operation | ||
method : String [재정의]
HTTP method for sending the request. | Operation | ||
name : String
The name of this Operation. | AbstractOperation | ||
operationManager : Function
This property is set usually by framework code which wants to modify the
behavior of a service invocation without modifying the way in which the
service is called externally. | AbstractInvoker | ||
properties : Object
This is a hook primarily for framework developers to register additional user
specified properties for your operation. | AbstractOperation | ||
request : Object
Object of name-value pairs used as parameters to the URL. | AbstractOperation | ||
requestTimeout : int
Provides access to the request timeout in seconds for sent messages. | AbstractOperation | ||
resultElementType : Class
Like resultType, used to define the ActionScript class used by a given operation though
this property only applies to operations which return a multi-valued result (e.g. | AbstractInvoker | ||
resultFormat : String [재정의]
Value that indicates how you want to deserialize the result
returned by the HTTP call. | Operation | ||
resultType : Class
Specifies an optional return type for the operation. | AbstractInvoker | ||
rootURL : String [재정의]
The rootURL is used to compute the URL for an HTTP service operation when the
a relative URL is specified for the operation. | Operation | ||
serializationFilter : SerializationFilter
A SerializationFilter can control how the arguments are formatted to form the content
of the HTTP request. | AbstractOperation | ||
service : AbstractService [읽기 전용]
Provides convenient access to the service on which the Operation
is being invoked. | AbstractOperation | ||
showBusyCursor : Boolean [재정의]
If true, a busy cursor is displayed while a service is executing. | Operation | ||
url : String
Location of the service. | AbstractOperation | ||
useProxy : Boolean [재정의]
Specifies whether to use the Flex proxy service. | Operation | ||
xmlDecode : Function
ActionScript function used to decode a service result from XML. | AbstractOperation | ||
xmlEncode : Function
ActionScript function used to encode a service request as XML. | AbstractOperation |
메서드 | 정의 주체 | ||
---|---|---|---|
Creates a new Operation. | Operation | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
리스너에서 이벤트 알림을 받을 수 있도록 EventDispatcher 객체에 이벤트 리스너 객체를 등록합니다. | EventDispatcher | ||
Cancels the last service invocation or an invokation with the specified ID. | AbstractInvoker | ||
Sets the result property of the invoker to null. | AbstractInvoker | ||
이벤트를 이벤트 흐름으로 전달합니다. | EventDispatcher | ||
EventDispatcher 객체에 특정 유형의 이벤트에 대한 리스너가 등록되어 있는지 여부를 확인합니다. | EventDispatcher | ||
지정된 속성이 객체에 정의되어 있는지 여부를 나타냅니다. | Object | ||
Object 클래스의 인스턴스가 매개 변수로 지정된 객체의 프로토타입 체인에 있는지 여부를 나타냅니다. | Object | ||
지정된 속성이 존재하고 열거 가능한지 여부를 나타냅니다. | Object | ||
EventDispatcher 객체에서 리스너를 제거합니다. | EventDispatcher | ||
[재정의]
Executes the http operation. | Operation | ||
AbstractOperation | |||
루프 작업에서 동적 속성을 사용할 수 있는지 여부를 설정합니다. | Object | ||
This hook is exposed to update the lastResult property. | AbstractInvoker | ||
로캘별 규칙에 따라 서식이 지정된 이 객체의 문자열 표현을 반환합니다. | Object | ||
지정된 객체의 문자열 표현을 반환합니다. | Object | ||
지정된 객체의 프리미티브 값을 반환합니다. | Object | ||
이 EventDispatcher 객체 또는 조상 객체에 지정한 이벤트 유형에 대한 이벤트 리스너가 등록되어 있는지 여부를 확인합니다. | EventDispatcher |
concurrency | 속성 |
concurrency:String
[재정의] 언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Value that indicates how to handle multiple calls to the same service operation. The default
value is multiple
. The following values are permitted:
multiple
Existing requests are not cancelled, and the developer is responsible for ensuring the consistency of returned data by carefully managing the event stream. This is the default value.single
Only a single request at a time is allowed on the operation; multiple requests generate a fault.last
Making a request cancels any existing request.
구현
override public function get concurrency():String
override public function set concurrency(value:String):void
contentType | 속성 |
contentType:String
[재정의]
Type of content for service requests.
The default is application/x-www-form-urlencoded
which sends requests
like a normal HTTP POST with name-value pairs. application/xml
send
requests as XML.
구현
override public function get contentType():String
override public function set contentType(value:String):void
makeObjectsBindable | 속성 |
makeObjectsBindable:Boolean
[재정의] 언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
When this value is true, anonymous objects returned are forced to bindable objects.
구현
override public function get makeObjectsBindable():Boolean
override public function set makeObjectsBindable(value:Boolean):void
method | 속성 |
method:String
[재정의]
HTTP method for sending the request. Permitted values are GET
, POST
, HEAD
,
OPTIONS
, PUT
, TRACE
and DELETE
.
Lowercase letters are converted to uppercase letters. The default value is GET
.
구현
override public function get method():String
override public function set method(value:String):void
resultFormat | 속성 |
resultFormat:String
[재정의] Value that indicates how you want to deserialize the result returned by the HTTP call. The value for this is based on the following:
- Whether you are returning XML or name/value pairs.
- How you want to access the results; you can access results as an object, text, or XML.
The default value is object
. The following values are permitted:
object
The value returned is XML and is parsed as a tree of ActionScript objects. This is the default.array
The value returned is XML and is parsed as a tree of ActionScript objects however if the top level object is not an Array, a new Array is created and the result set as the first item. If makeObjectsBindable is true then the Array will be wrapped in an ArrayCollection.xml
The value returned is XML and is returned as literal XML in an ActionScript XMLnode object.flashvars
The value returned is text containing name=value pairs separated by ampersands, which is parsed into an ActionScript object.text
The value returned is text, and is left raw.e4x
The value returned is XML and is returned as literal XML in an ActionScript XML object, which can be accessed using ECMAScript for XML (E4X) expressions.
구현
override public function get resultFormat():String
override public function set resultFormat(value:String):void
rootURL | 속성 |
rootURL:String
[재정의] 언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
The rootURL is used to compute the URL for an HTTP service operation when the a relative URL is specified for the operation. The directory name of the rootURL is prepended to any relative URLs for the operation. It is typically more convenient to set the baseURL since baseURL specifies the directory name directly whereas rootURL specifies the name of a file whose directory name is prepended. If neither rootURL nor baseURL are set explicitly, the directory name of the .swf file is prepended to relative paths.
구현
override public function get rootURL():String
override public function set rootURL(value:String):void
showBusyCursor | 속성 |
useProxy | 속성 |
useProxy:Boolean
[재정의]
Specifies whether to use the Flex proxy service. The default value is false
. If you
do not specify true
to proxy requests though the Flex server, you must ensure that the player
can reach the target URL. You also cannot use destinations defined in the services-config.xml file if the
useProxy
property is set to false
.
구현
override public function get useProxy():Boolean
override public function set useProxy(value:Boolean):void
Operation | () | 생성자 |
public function Operation(service:mx.rpc.http:HTTPMultiService = null, name:String = null)
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 Creates a new Operation. |
런타임 버전: | Flash Player 9, AIR 1.1 |
Creates a new Operation.
매개 변수service:mx.rpc.http:HTTPMultiService (default = null ) — The HTTPMultiService object defining the service.
| |
name:String (default = null ) — The name of the service.
|
send | () | 메서드 |
override public function send(... args):mx.rpc:AsyncToken
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Executes the http operation. Any arguments passed in are passed along as part of the operation call. If there are no arguments passed, the arguments property of class is used as the source of parameters. HTTP operations commonly take named parameters, not positional parameters. To supply the names for these parameters, you can also set the argumentNames property to an array of the property names.
매개 변수
... args — Optional arguments passed in as part of the method call. If there
are no arguments passed, the arguments object is used as the source of
parameters.
|
mx.rpc:AsyncToken — AsyncToken Call using the asynchronous completion token pattern.
The same object is available in the result and
fault events from the token property.
|
Tue Jun 12 2018, 03:17 PM Z