blob: ca71fd4382605b07f2f78bb1f6992e714ffe12e9 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!-- saved from url=(0014)about:internet --><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" href="../../style.css" type="text/css" media="screen"><link rel="stylesheet" href="../../print.css" type="text/css" media="print"><link rel="stylesheet" href="../../override.css" type="text/css"><meta name="keywords" content="AbstractInvoker,mx.rpc.AbstractInvoker,_keepLastResult,arguments,channelSet,content,destination,faultCode,faultDetail,faultString,keepLastResult,keepLastResult,lastResult,lastResult,makeObjectsBindable,managers,message,name,operationManager,operations,properties,requestTimeout,responders,result,resultElementType,resultType,rootCause,service,token,addResponder,cancel,clearResult,disconnect,fault,fault,fault,fault,getOperation,hasPendingRequestForMessage,hasResponder,initialize,invoke,logout,result,result,result,result,send,setCredentials,setRemoteCredentials,setResult,toString"><title>mx.rpc.AbstractInvoker</title></head><body><script language="javascript" type="text/javascript" src="../../asdoc.js"></script><script language="javascript" type="text/javascript" src="../../help.js"></script><script language="javascript" type="text/javascript" src="../../cookies.js"></script><script language="javascript" type="text/javascript"><!--
asdocTitle = 'AbstractInvoker - ApacheFlex API Reference';
var baseRef = '../../';
window.onload = configPage;
--></script>
<script type="text/javascript">
scrollToNameAnchor();
</script><table class="titleTable" cellpadding="0" cellspacing="0" id="titleTable" style="display:none"><tr><td class="titleTableTitle" align="left">Apache Flex 4.16.1 API Reference </td><td class="titleTableTopNav" align="right"><a href="../../package-summary.html" onclick="loadClassListFrame('../../all-classes.html')">All Packages</a>&nbsp;|&nbsp;<a href="../../class-summary.html" onclick="loadClassListFrame('../../all-classes.html')">All Classes</a>&nbsp;|&nbsp;<a href="../../all-index-A.html" onclick="loadClassListFrame('../../index-list.html')">Index</a>&nbsp;|&nbsp;<a id="framesLink1" href="../../index.html?mx/rpc/AbstractInvoker.html&amp;mx/rpc/class-list.html">Frames</a><a id="noFramesLink1" style="display:none" href="" onclick="parent.location=document.location"> No Frames </a></td><td class="titleTableLogo" align="right" rowspan="3"><img src="../../images/logo.jpg" class="logoImage" alt="AdobeLogo" title="AdobeLogo"></td></tr><tr class="titleTableRow2"><td class="titleTableSubTitle" id="subTitle" align="left">AbstractInvoker</td><td class="titleTableSubNav" id="subNav" align="right"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a></td></tr><tr class="titleTableRow3"><td colspan="3">&nbsp;</td></tr></table><script language="javascript" type="text/javascript" xml:space="preserve">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("AbstractInvoker"); titleBar_setSubNav(false,true,false,false,false,false,false,false,true,false,false ,false,false,false,false,false);}
-->
</script><div xmlns:fn="http://www.w3.org/2005/xpath-functions" class="MainContent"><table class="classHeaderTable" cellpadding="0" cellspacing="0"><tr><td class="classHeaderTableLabel">Package</td><td><a href="package-detail.html" onclick="javascript:loadClassListFrame('class-list.html')">mx.rpc</a></td></tr><tr><td class="classHeaderTableLabel">Class</td><td class="classSignature">public class AbstractInvoker</td></tr><tr><td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">AbstractInvoker <img src="../../images/inherit-arrow.gif" title="Inheritance" alt="Inheritance" class="inheritArrow"> flash.events.EventDispatcher</td></tr><tr><td class="classHeaderTableLabel">Subclasses</td><td> <a href="../../mx/rpc/AbstractOperation.html">AbstractOperation</a>, <a href="../../mx/rpc/http/HTTPService.html">HTTPService</a></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p></p><p></p>
An invoker is an object that actually executes a remote procedure call (RPC).
For example, RemoteObject, HTTPService, and WebService objects are invokers.
<p></p><br/><hr></div><a name="propertySummary"></a><div class="summarySection"><div class="summaryTableTitle">Public Properties</div><table cellspacing="0" cellpadding="3" class="summaryTable " id="summaryTableProperty"><tr><th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined By</th></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#keepLastResult" class="signatureLink">keepLastResult</a> : Boolean<div class="summaryTableDescription"> Flag indicating whether the operation should keep its last call result for later access.</div></td><td class="summaryTableOwnerCol">AbstractInvoker</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#lastResult" class="signatureLink">lastResult</a> : Object<div class="summaryTableDescription">[read-only]
The result of the last invocation.</div></td><td class="summaryTableOwnerCol">AbstractInvoker</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#makeObjectsBindable" class="signatureLink">makeObjectsBindable</a> : Boolean<div class="summaryTableDescription">
When this value is true, anonymous objects returned are forced to bindable objects.</div></td><td class="summaryTableOwnerCol">AbstractInvoker</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#operationManager" class="signatureLink">operationManager</a> : Function<div class="summaryTableDescription">
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.</div></td><td class="summaryTableOwnerCol">AbstractInvoker</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#resultElementType" class="signatureLink">resultElementType</a> : Class<div class="summaryTableDescription">
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.</div></td><td class="summaryTableOwnerCol">AbstractInvoker</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#resultType" class="signatureLink">resultType</a> : Class<div class="summaryTableDescription">
Specifies an optional return type for the operation.</div></td><td class="summaryTableOwnerCol">AbstractInvoker</td></tr></table></div><a name="methodSummary"></a><div class="summarySection"><div class="summaryTableTitle">Public Methods </div><table cellspacing="0" cellpadding="3" class="summaryTable " id="summaryTableMethod"><tr><th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined By</th></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#cancel()" class="signatureLink">cancel</a>(id:String = null):<a href="../../mx/rpc/AsyncToken.html">AsyncToken</a></div><div class="summaryTableDescription">
Cancels the last service invocation or an invokation with the specified ID.</div></td><td class="summaryTableOwnerCol">AbstractInvoker</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#clearResult()" class="signatureLink">clearResult</a>(fireBindingEvent:Boolean = true):void</div><div class="summaryTableDescription">
Sets the result property of the invoker to null.</div></td><td class="summaryTableOwnerCol">AbstractInvoker</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#setResult()" class="signatureLink">setResult</a>(result:Object):void</div><div class="summaryTableDescription">
This hook is exposed to update the lastResult property.</div></td><td class="summaryTableOwnerCol">AbstractInvoker</td></tr></table></div><script language="javascript" type="text/javascript"><!--
showHideInherited();
--></script><div class="MainContent"><div class="detailSectionHeader">Property Detail</div><a name="propertyDetail"></a><a name="keepLastResult"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">keepLastResult</td><td class="detailHeaderType">property</td></tr></table><div class="detailBody"><code>keepLastResult:Boolean</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 4.11</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 10, AIR 3</td></tr></table><p></p><p></p><p> Flag indicating whether the operation should keep its last call result for later access.
<p> If set to true, the last call result will be accessible through <code>lastResult</code> bindable property. </p>
<p> If set to false, the last call result will be cleared after the call,
and must be processed in the operation's result handler.
This will allow the result object to be garbage collected,
which is especially useful if the operation is only called a few times and returns a large result. </p>
<p>If not set, will use the <code>keepLastResult</code> value of its owning Service, if any, or the default value.</p>
</p><p> The default value is <code>true</code>.</p><br/><span class="label"> Implementation </span><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function get keepLastResult():Boolean</code><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function set keepLastResult(value:Boolean):void</code><br/><p><span class="label">See also</span></p><div class="seeAlso"><a href="AbstractInvoker.html#lastResult" target="">lastResult</a><br/><a href="AbstractService.html#keepLastResult" target="">mx.rpc.AbstractService.keepLastResult</a></div></div><a name="propertyDetail"></a><a name="lastResult"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">lastResult</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>lastResult:Object</code>&nbsp;&nbsp;[read-only] <p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p>
The result of the last invocation.
</p><p>This property can be used as the source for data binding.</p><br/><span class="label"> Implementation </span><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function get lastResult():Object</code><br/></div><a name="propertyDetail"></a><a name="makeObjectsBindable"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">makeObjectsBindable</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>makeObjectsBindable:Boolean</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p>
When this value is true, anonymous objects returned are forced to bindable objects.
</p><br/><span class="label"> Implementation </span><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function get makeObjectsBindable():Boolean</code><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function set makeObjectsBindable(value:Boolean):void</code><br/></div><a name="propertyDetail"></a><a name="operationManager"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">operationManager</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>public var operationManager:Function</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p>
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. This allows you to add a "filter" step on
the method call to ensure for example that you do not return duplicate
instances for the same id or to insert parameters for performing on-demand
paging.
When this is set to a non-null value on the send call, the operationManager function
is called instead. It returns the token that the caller uses to be notified
of the result. Typically the called function will at some point clear this
property temporarily, then invoke the operation again actually sending it to
the server this time.
</p></div><a name="propertyDetail"></a><a name="resultElementType"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">resultElementType</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>public var resultElementType:Class</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p>
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. an Array
or ArrayCollection (IList)). This property specifies an ActionScript class for the members of the
array or array collection. When you set resultElementType, you do not have to set
resultType. In that case, the operation returns an Array if makeObjectsbindable is
false and an ArrayCollection otherwise.
</p></div><a name="propertyDetail"></a><a name="resultType"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">resultType</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>public var resultType:Class</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p>
Specifies an optional return type for the operation. Used in situations where
you want to coerce the over-the-wire information into a specific ActionScript class
or to provide metadata for other services as to the return type of this operation.
</p></div><a name="methodDetail"></a><div class="detailSectionHeader">Method Detail</div><a name="cancel()"></a><a name="cancel(String)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">cancel</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td></tr></table><div class="detailBody"><code> public function cancel(id:String = null):<a href="../../mx/rpc/AsyncToken.html">AsyncToken</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p>
Cancels the last service invocation or an invokation with the specified ID.
Even though the network operation may still continue, no result or fault event
is dispatched.
</p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">id</span>:String</code> (default = <code>null</code>)<code></code> &mdash; The messageId of the invocation to cancel. Optional. If omitted, the
last service invocation is canceled.
</td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../mx/rpc/AsyncToken.html">AsyncToken</a></code> &mdash; The AsyncToken associated with the call that is cancelled or null if no call was cancelled.
</td></tr></table></div><a name="clearResult()"></a><a name="clearResult(Boolean)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">clearResult</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function clearResult(fireBindingEvent:Boolean = true):void</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p>
Sets the <code>result</code> property of the invoker to <code>null</code>.
This is useful when the result is a large object that is no longer being
used.
</p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">fireBindingEvent</span>:Boolean</code> (default = <code>true</code>)<code></code> &mdash; Set to <code>true</code> if you want anything
bound to the result to update. Otherwise, set to
<code>false</code>.
The default value is <code>true</code>
</td></tr></table></p></div><a name="setResult()"></a><a name="setResult(Object)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">setResult</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function setResult(result:Object):void</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p>
This hook is exposed to update the lastResult property. Since lastResult
is ordinarily updated automatically by the service, you do not typically
call this. It is used by managed services that want to ensure lastResult
always points to "the" managed instance for a given identity even if the
the service returns a new copy of the same object.
</p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">result</span>:Object</code> &mdash; The new value for the lastResult property.
</td></tr></table></p></div><br/><br/><hr><br/><p></p><center class="copyright"><footer>The Apache Software Foundation</footer><br/>Wed Nov 15 2017, 09:50 AM +01:00 </center></div></body></html><!--The Apache Software Foundation<br/>Wed Nov 15 2017, 09:50 AM +01:00 -->