This page was saved using jaction on 2006-09-04 8:34:00.
Address: http://flexdocs.kr/docs/flex2/langref/mx/rpc/remoting/mxml/RemoteObject.html
Title: mx.rpc.remoting.mxml.RemoteObject (Flex™ 2 레퍼런스 가이드)  •  Size: 49394
(Flex Data Services 전용)
Packagemx.rpc.remoting.mxml
Classpublic dynamic class RemoteObject
InheritanceRemoteObject Inheritance RemoteObject Inheritance AbstractService Inheritance Proxy Inheritance Object
ImplementsIMXMLObject , IMXMLSupport

<mx:RemoteObject> 태그에 의해, Action Message Format (AMF) 인코딩을 사용하는 Java object의 Methods에 액세스 할 수 있습니다.

MXML 문장구조법expandedMXML 문장구조법의 비표시

<mx:RemoteObject> 태그에서는, 이하의 태그 속성을 사용할 수 있습니다.

 <mx:RemoteObject property concurrency="multiple|single|last" destination="디폴트치 없음" id="디폴트치 없음" endpoint="디폴트치 없음" showBusyCursor="false|true" source="디폴트치 없음" (현재, Macromedia ColdFusion 전용) makeObjectsBindable="false|true"
  
event fault="디폴트치 없음" result="디폴트치 없음" /> 

<mx:RemoteObject> 는, 복수의 <mx:method> 태그를 가질 수가 있습니다. 이 태그에는, 이하의 태그 속성이 있습니다.

 <mx:method property concurrency="multiple|single|last" name="디폴트치 이루어, 필수" makeObjectsBindable="false|true"
         
event fault="디폴트치 없음" result="디폴트치 없음" /> 

단일의 <mx:arguments> 자 태그를 가질 수가 있습니다. 이것은, 차례로 건네받는 object의 배열입니다.

View the examples

See also

RPC 컴퍼넌트의 사용


Public property
 property정의
 InheritedchannelSet : ChannelSet
서비스가 사용하는 ChannelSet 에의 액세스를 제공합니다.
AbstractService
  concurrency : String
동일 서비스에 대한 복수의 호출의 처리 방법을 나타내는 값입니다.
RemoteObject
 Inheritedconstructor : Object
특정의 object 인스턴스의 클래스 object 또는 constructor    함수에의 참조입니다.
Object
 Inheriteddestination : String
서비스의 행선지입니다.
AbstractService
  endpoint : String
이 property를 사용하면, 개발자는 컴파일시에 서비스 설정 파일을 참조하거나 프로그램으로 ChannelSet 를 작성하는 것 없이 , RemoteObject 행선지의 엔드 포인트를 간단하게 지정할 수 있습니다.
RemoteObject
 InheritedmakeObjectsBindable : Boolean
이 값이 true 의 경우, 돌려주어진 익명 object는 강제적으로 바인드 가능 object로 됩니다.
RemoteObject
 Inheritedoperations : Object
통상, Operations 배열은 MXML 태그를 사용해 서비스를 작성했을 경우에, MXML 컴파일러에 의해서만 설정됩니다.
AbstractService
 Inheritedprototype : Object
[static] 클래스 또는 함수 object의 prototype object에의 참조입니다.
Object
 InheritedrequestTimeout : int
송신 메세지의 요구 타임 아웃 시간 (초단위)에 대한 액세스를 제공합니다.
AbstractService
  showBusyCursor : Boolean
true 의 경우, 서비스의 실행중에 Busy 커서가 표시됩니다.
RemoteObject
 Inheritedsource : String
클라이언트상의 소스치를 지정할 수가 있습니다. JavaAdapter 를 사용하는 행선지에는 지원(support)되고 있지 않습니다.
RemoteObject
Public Methods
 Methods정의
  RemoteObject (destination:String = null)
새로운 RemoteObject 를 작성합니다.
RemoteObject
 Inheriteddisconnect ():void
서비스의 네트워크 접속을 절단 해, 보류되고 있는 요구의 모든 응답측을 삭제합니다.
AbstractService
 InheritedgetOperation (name:String ):AbstractOperation
지정된 이름의 Operation 를 돌려줍니다.
AbstractService
 InheritedhasOwnProperty (name:String ):Boolean
object로 지정된 property가 정의되고 있는지 어떤지를 나타냅니다.
Object
  initialized (document:Object , id:String ):void
RemoteObject 가 태그를 사용해 설정되어 있는 경우, MXML 컴파일러에 의해 자동적으로 불려 갑니다.
RemoteObject
 InheritedisPrototypeOf (theClass:Object ):Boolean
Object 클래스의 인스턴스가, Parameters로서 지정된 object의 prototype 체인내에 있을지 어떨지를 나타냅니다.
Object
 Inheritedlogout ():void
유저를 행선지로부터 로그아웃 합니다.
AbstractService
 InheritedpropertyIsEnumerable (name:String ):Boolean
지정된 property가 존재해, 열거 가능한가 어떤가를 나타냅니다.
Object
 InheritedsetCredentials (username:String , password:String ):void
서비스가 액세스 하는 행선지의 증명서를 설정합니다.
AbstractService
 InheritedsetPropertyIsEnumerable (name:String , isEnum:Boolean = true):void
루프 처리에 대한 다이나믹 property의 가용성을 설정합니다.
Object
 InheritedsetRemoteCredentials (remoteUsername:String , remotePassword:String ):void
리모트 object가 ColdFusion Component (CFC)등의 외부 서비스로 관리되고 있는 경우, 그 리모트 서비스의 인증 메카니즘에 대한 유저명과 패스워드를 설정할 수가 있습니다.
RemoteObject
 InheritedtoString ():String
RemoteObject 의 인스턴스를, 행선지 ID 나 할당할 수 있었던 채널세트등이 중요한 property를 기술하는 string로서 나타냅니다.
RemoteObject
 InheritedvalueOf ():Object
지정된 object의 원시적치를 돌려줍니다.
Object
Protected Methods
 Methods정의
 InheritedcallProperty (name:* , ... rest):*
함수로서 호출해 가능한 object property의 동작을 덧쓰기합니다.
Proxy
 InheriteddeleteProperty (name:* ):Boolean
property를 삭제하는 요구를 덧쓰기합니다.
Proxy
 InheritedgetDescendants (name:* ):*
descendant 연산자의 사용을 재정의(override) 합니다.
Proxy
 InheritedgetProperty (name:* ):*
property의 값에 대한 요구를 덧쓰기합니다.
Proxy
 InheritedhasProperty (name:* ):Boolean
object가 특정의 property를 가지고 있을지 어떨지를 이름 마다 체크하는 요구를 덧쓰기합니다.
Proxy
 InheritedisAttribute (name:* ):Boolean
지정된 QName 가 속성으로서 마크 되고 있는지 어떤지를 확인합니다.
Proxy
 InheritednextName (index:int ):String
인덱스 번호를 사용해, 프록시가 되는 object의 property를 열거해 property명을 취득할 수 있습니다.
Proxy
 InheritednextNameIndex (index:int ):int
인덱스 번호를 사용해, 프록시가 되는 object의 property를 열거할 수 있습니다.
Proxy
 InheritednextValue (index:int ):*
인덱스 번호를 사용해, 프록시가 되는 object의 property를 열거해 property치를 취득할 수 있습니다.
Proxy
 InheritedsetProperty (name:* , value:* ):void
property의 값을 변경하는 호출을 덧쓰기합니다.
Proxy
이벤트
 이벤트일람정의
 Inheritedfault fault 이벤트는, 서비스 호출이 실패했을 경우에 dispatch됩니다. 조작 자체는, 이 이벤트를 처리하지 않습니다. AbstractService
 Inheritedinvoke 채널이 메세지의 송신을 시행하기 전에 에러가 슬로우 되지 않는 이상 서비스의 조작이 불려 갔을 때에, invoke 이벤트가 dispatch됩니다. AbstractService
 Inheritedresult result 이벤트는, 서비스 호출로부터 제어가 정상적으로 되돌려졌을 경우에 dispatch됩니다. 조작 자체는, 이 이벤트를 처리하지 않습니다. AbstractService
property의 상세
concurrencyproperty
public var concurrency:String

동일 서비스에 대한 복수의 호출의 처리 방법을 나타내는 값입니다. 디폴트치는 multiple 입니다. 사용할 수 있는 값은 다음과 같습니다.

endpointproperty 
endpoint:String   [read-write]

이 property를 사용하면, 개발자는 컴파일시에 서비스 설정 파일을 참조하거나 프로그램으로 ChannelSet 를 작성하는 것 없이 , RemoteObject 행선지의 엔드 포인트를 간단하게 지정할 수 있습니다. 또, 기존의 ChannelSet 가 RemoteObject 서비스로 설정되어 있는 경우, 이 property는 그 ChannelSet 를 재정의(override) 합니다.

엔드 포인트 URL 가 "https" 로 시작되어 있는 경우, SecureAMFChannel 가 사용됩니다. 그 이외의 경우는, AMFChannel 가 사용됩니다. 엔드 포인트 URL 로 2 개의 특별한 토큰,{server.name} 와 {server.port} 를 사용하면, SWF 의 로드에 사용된 서버명과 포토를 채널이 사용하도록(듯이) 지정할 수 있습니다.

Implements
    public function get endpoint():String
    public function set endpoint(value:String ):void
showBusyCursorproperty 
showBusyCursor:Boolean   [read-write]

true 의 경우, 서비스의 실행중에 Busy 커서가 표시됩니다. 디폴트치는 false 입니다.

Implements
    public function get showBusyCursor():Boolean
    public function set showBusyCursor(value:Boolean ):void
constructor    의 상세
RemoteObject()constructor   
public 함수 RemoteObject(destination:String = null)

새로운 RemoteObject 를 작성합니다.

Parameters
destination:String (default = null) — RemoteObject 의 행선지. services-config.xml 파일내의 행선지명으로 일치할 필요가 있습니다.
Methods의 상세
initialized()Methods
public function initialized(document:Object , id:String ):void

RemoteObject 가 태그를 사용해 설정되어 있는 경우, MXML 컴파일러에 의해 자동적으로 불려 갑니다. ActionScript 에 의해 RemoteObject 를 작성하는 경우, 이 Methods는 모든 Parameters를 검증할 때에 도움이 되기 (위해)때문에, 이 Methods를 호출하는 것을 추천합니다.

Parameters
document:Object — 이 RemoteObject 가 존재하는 MXML 문서입니다.
 
id:String — 문서 내부에서의 이 RemoteObject 의 ID 입니다.
Examples
RemoteObjectExample
<? xml version="1.0"? >
<! -- Simple example to demonstrate the RemoteObject tag.  -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">

<! --  Make sure the Flex Data Services proxy-config.xml file contains the following definition.
      The Java class mypackage.stockquote.MyTicker.class must be available on the 
      web application's classpath.

    <destination id="MyRemoteObjectDest">
        <properties>
            <source>mypackage.stockquote.MyTicker</source>
            <scope>application</scope>
        </properties>
    </destination>
-->

    <mx:Script>
        <! [CDATA[
            import mx.controls.Alert;        
        ]]>    
    </mx:Script>

    <mx:RemoteObject id="RO" destination="MyRemoteObjectDest"
        fault="Alert.show(event.fault.faultstring), 'Error'">

        <mx:method name="GetQuote">
            <mx:arguments>
                <symbol>{stockSymbol.text}</symbol>
            </mx:arguments>
        </mx:method>
    </mx:RemoteObject>

    <mx:Panel title="RemoteObject Example" height="75%" width="75%" 
        paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10">

        <mx:Label width="100%"  color="blue"
            text="Enter a stock symbol to obtain a quote. "/>

        <mx:TextInput id="stockSymbol" text="ADBE"/>
        <mx:Button label="Get Quote" click="RO.GetQuote.send()"/>

        <mx:Text htmlText="Company: {RO.GetQuote.lastResult.GetQuoteResult.StockQuote.Company}"/>
        <mx:Text htmlText="Current price: ${RO.GetQuote.lastResult.GetQuoteResult.StockQuote.Price}"/>

    </mx:Panel>    
</mx:Application>






 

코멘트가 추가되었을 경우, 메일로 받기. | 코멘트 리포트

현재의 페이지: http://flexdocs.kr/docs/flex2/langref/mx/rpc/remoting/mxml/RemoteObject.html