blob: c42419e1eed5a79d82dd8c7432c99518b9e44f77 [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="AbstractConsumer,mx.messaging.AbstractConsumer,CONNECT_TIMEOUT_SECONDS,DEFAULT_PRIORITY,ENABLE_SMALL_MESSAGES,FALSE,RECORD_MESSAGE_SIZES,RECORD_MESSAGE_TIMES,REQUEST_TIMEOUT_SECONDS,SERIALIZATION,TRUE,_shouldBeSubscribed,agent,authenticated,authenticated,authenticated,autoConnect,channel,channelIds,channelSet,channelSets,channels,clientId,clustered,connectTimeout,connected,connected,connected,currentChannel,defaultHeaders,destination,endpoint,failoverURIs,heartbeatInterval,id,id,initialDestinationId,maxFrequency,maxFrequency,message,messageAgents,priority,protocol,reconnectAttempts,reconnectInterval,reconnecting,recordMessageSizes,recordMessageTimes,requestTimeout,requestTimeout,resubscribeAttempts,resubscribeInterval,selector,selector,shouldBeConnected,subscribed,subscriptions,subtopic,subtopic,subtopic,subtopics,timestamp,uri,acknowledge,addChannel,addSubscription,addSubtopic,applyClientLoadBalancingSettings,applySettings,buildSubscribeMessage,buildSubscribeMessage,buildUnsubscribeMessage,buildUnsubscribeMessage,channelConnectHandler,channelConnectHandler,channelDisconnectHandler,channelDisconnectHandler,channelFaultHandler,channelFaultHandler,connect,connect,connect,connectFailed,connectSuccess,connectTimeoutHandler,createRequestTimeoutErrorMessage,disconnect,disconnect,disconnect,disconnect,disconnect,disconnectAll,disconnectFailed,disconnectSuccess,fault,flexClientWaitHandler,getInstance,getMessageResponder,handleAuthenticationFault,hasPendingRequestForMessage,initChannelSet,initialized,internalConnect,internalDisconnect,internalSend,internalSend,login,logout,logout,logout,messageHandler,reAuthorize,receive,removeChannel,removeSubscription,removeSubtopic,requestTimedOut,result,resultHandler,send,send,send,setCredentials,setCredentials,setCredentials,setRemoteCredentials,status,statusHandler,subscribe,toString,unsubscribe"><title>mx.messaging.AbstractConsumer</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 = 'AbstractConsumer - 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/messaging/AbstractConsumer.html&amp;mx/messaging/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">AbstractConsumer</td><td class="titleTableSubNav" id="subNav" align="right"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a>&nbsp;| <a href="#eventSummary">Events</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("AbstractConsumer"); titleBar_setSubNav(false,true,false,false,false,false,true,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.messaging</a></td></tr><tr><td class="classHeaderTableLabel">Class</td><td class="classSignature">public class AbstractConsumer</td></tr><tr><td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">AbstractConsumer <img src="../../images/inherit-arrow.gif" title="Inheritance" alt="Inheritance" class="inheritArrow"> <a href="../../mx/messaging/MessageAgent.html">MessageAgent</a> <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/messaging/Consumer.html">Consumer</a>, <a href="../../mx/messaging/MultiTopicConsumer.html">MultiTopicConsumer</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 Versions :&nbsp;</b></td><td>BlazeDS 4, LCDS 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>
The AbstractConsumer is the base class for both the Consumer and
MultiTopicConsumer classes. You use those classes to receive pushed
messages from the server.
<p></p><br/><hr></div><a name="propertySummary"></a><div class="summarySection"><div class="summaryTableTitle">Public Properties</div><div class="showHideLinks"><div id="hideInheritedProperty" class="hideInheritedProperty"><a class="showHideLink" href="#propertySummary" onclick="javascript:setInheritedVisible(false,'Property');"><img class="showHideLinkImage" src="../../images/expanded.gif"> Hide Inherited Public Properties</a></div><div id="showInheritedProperty" class="showInheritedProperty"><a class="showHideLink" href="#propertySummary" onclick="javascript:setInheritedVisible(true,'Property');"><img class="showHideLinkImage" src="../../images/collapsed.gif"> Show Inherited Public Properties</a></div></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="hideInheritedProperty"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><a href="../../mx/messaging/MessageAgent.html#authenticated" class="signatureLink">authenticated</a> : Boolean<div class="summaryTableDescription">[read-only]
Indicates if this MessageAgent is using an authenticated connection to
its destination.</div></td><td class="summaryTableOwnerCol"><a href="../../mx/messaging/MessageAgent.html">MessageAgent</a></td></tr><tr class="hideInheritedProperty"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><a href="../../mx/messaging/MessageAgent.html#channelSet" class="signatureLink">channelSet</a> : <a href="../../mx/messaging/ChannelSet.html">ChannelSet</a><div class="summaryTableDescription">
Provides access to the ChannelSet used by the MessageAgent.</div></td><td class="summaryTableOwnerCol"><a href="../../mx/messaging/MessageAgent.html">MessageAgent</a></td></tr><tr class="hideInheritedProperty"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><a href="../../mx/messaging/MessageAgent.html#clientId" class="signatureLink">clientId</a> : String<div class="summaryTableDescription">[read-only]
Provides access to the client id for the MessageAgent.</div></td><td class="summaryTableOwnerCol"><a href="../../mx/messaging/MessageAgent.html">MessageAgent</a></td></tr><tr class="hideInheritedProperty"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><a href="../../mx/messaging/MessageAgent.html#connected" class="signatureLink">connected</a> : Boolean<div class="summaryTableDescription">[read-only]
Indicates whether this MessageAgent is currently connected to its
destination via its ChannelSet.</div></td><td class="summaryTableOwnerCol"><a href="../../mx/messaging/MessageAgent.html">MessageAgent</a></td></tr><tr class="hideInheritedProperty"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><a href="../../mx/messaging/MessageAgent.html#destination" class="signatureLink">destination</a> : String<div class="summaryTableDescription">
Provides access to the destination for the MessageAgent.</div></td><td class="summaryTableOwnerCol"><a href="../../mx/messaging/MessageAgent.html">MessageAgent</a></td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#maxFrequency" class="signatureLink">maxFrequency</a> : uint<div class="summaryTableDescription">
Determines the maximum number of messages per second the Consumer wants
to receive.</div></td><td class="summaryTableOwnerCol">AbstractConsumer</td></tr><tr class="hideInheritedProperty"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><a href="../../mx/messaging/MessageAgent.html#requestTimeout" class="signatureLink">requestTimeout</a> : int<div class="summaryTableDescription">
Provides access to the request timeout in seconds for sent messages.</div></td><td class="summaryTableOwnerCol"><a href="../../mx/messaging/MessageAgent.html">MessageAgent</a></td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#resubscribeAttempts" class="signatureLink">resubscribeAttempts</a> : int<div class="summaryTableDescription">
The number of resubscribe attempts that the Consumer makes in the event
that the destination is unavailable or the connection to the destination fails.</div></td><td class="summaryTableOwnerCol">AbstractConsumer</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#resubscribeInterval" class="signatureLink">resubscribeInterval</a> : int<div class="summaryTableDescription">
The number of milliseconds between resubscribe attempts.</div></td><td class="summaryTableOwnerCol">AbstractConsumer</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#subscribed" class="signatureLink">subscribed</a> : Boolean<div class="summaryTableDescription">[read-only]
Indicates whether the Consumer is currently subscribed.</div></td><td class="summaryTableOwnerCol">AbstractConsumer</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#timestamp" class="signatureLink">timestamp</a> : Number<div class="summaryTableDescription">
Contains the timestamp of the most recent message this Consumer
has received.</div></td><td class="summaryTableOwnerCol">AbstractConsumer</td></tr></table></div><a name="protectedPropertySummary"></a><div class="summarySection"><div class="summaryTableTitle">Protected Properties</div><table cellspacing="0" cellpadding="3" class="summaryTable " id="summaryTableProtectedProperty"><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="#_shouldBeSubscribed" class="signatureLink">_shouldBeSubscribed</a> : Boolean<div class="summaryTableDescription">
Flag indicating whether this consumer should be subscribed or not.</div></td><td class="summaryTableOwnerCol">AbstractConsumer</td></tr></table></div><a name="methodSummary"></a><div class="summarySection"><div class="summaryTableTitle">Public Methods </div><div class="showHideLinks"><div id="hideInheritedMethod" class="hideInheritedMethod"><a class="showHideLink" href="#methodSummary" onclick="javascript:setInheritedVisible(false,'Method');"><img class="showHideLinkImage" src="../../images/expanded.gif"> Hide Inherited Public Methods</a></div><div id="showInheritedMethod" class="showInheritedMethod"><a class="showHideLink" href="#methodSummary" onclick="javascript:setInheritedVisible(true,'Method');"><img class="showHideLinkImage" src="../../images/collapsed.gif"> Show Inherited Public Methods</a></div></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="#AbstractConsumer()" class="signatureLink">AbstractConsumer</a>()</div><div class="summaryTableDescription">
Constructs a Consumer.</div></td><td class="summaryTableOwnerCol">AbstractConsumer</td></tr><tr class="hideInheritedMethod"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="../../mx/messaging/MessageAgent.html#acknowledge()" class="signatureLink">acknowledge</a>(ackMsg:<a href="../../mx/messaging/messages/AcknowledgeMessage.html">AcknowledgeMessage</a>, msg:<a href="../../mx/messaging/messages/IMessage.html">IMessage</a>):void</div><div class="summaryTableDescription">
Invoked by a MessageResponder upon receiving a result for a sent
message.</div></td><td class="summaryTableOwnerCol"><a href="../../mx/messaging/MessageAgent.html">MessageAgent</a></td></tr><tr class="hideInheritedMethod"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="../../mx/messaging/MessageAgent.html#channelConnectHandler()" class="signatureLink">channelConnectHandler</a>(event:<a href="../../mx/messaging/events/ChannelEvent.html">ChannelEvent</a>):void</div><div class="summaryTableDescription">
Handles a CONNECT ChannelEvent.</div></td><td class="summaryTableOwnerCol"><a href="../../mx/messaging/MessageAgent.html">MessageAgent</a></td></tr><tr class="hideInheritedMethod"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="../../mx/messaging/MessageAgent.html#channelDisconnectHandler()" class="signatureLink">channelDisconnectHandler</a>(event:<a href="../../mx/messaging/events/ChannelEvent.html">ChannelEvent</a>):void</div><div class="summaryTableDescription">
Handles a DISCONNECT ChannelEvent.</div></td><td class="summaryTableOwnerCol"><a href="../../mx/messaging/MessageAgent.html">MessageAgent</a></td></tr><tr class="hideInheritedMethod"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="../../mx/messaging/MessageAgent.html#channelFaultHandler()" class="signatureLink">channelFaultHandler</a>(event:<a href="../../mx/messaging/events/ChannelFaultEvent.html">ChannelFaultEvent</a>):void</div><div class="summaryTableDescription">
Handles a ChannelFaultEvent.</div></td><td class="summaryTableOwnerCol"><a href="../../mx/messaging/MessageAgent.html">MessageAgent</a></td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#disconnect()" class="signatureLink">disconnect</a>():void</div><div class="summaryTableDescription">[override]
Disconnects the Consumer from its remote destination.</div></td><td class="summaryTableOwnerCol">AbstractConsumer</td></tr><tr class="hideInheritedMethod"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="../../mx/messaging/MessageAgent.html#fault()" class="signatureLink">fault</a>(errMsg:<a href="../../mx/messaging/messages/ErrorMessage.html">ErrorMessage</a>, msg:<a href="../../mx/messaging/messages/IMessage.html">IMessage</a>):void</div><div class="summaryTableDescription">
Invoked by a MessageResponder upon receiving a fault for a sent message.</div></td><td class="summaryTableOwnerCol"><a href="../../mx/messaging/MessageAgent.html">MessageAgent</a></td></tr><tr class="hideInheritedMethod"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="../../mx/messaging/MessageAgent.html#hasPendingRequestForMessage()" class="signatureLink">hasPendingRequestForMessage</a>(msg:<a href="../../mx/messaging/messages/IMessage.html">IMessage</a>):Boolean</div><div class="summaryTableDescription">
Returns true if there are any pending requests for the passed in message.</div></td><td class="summaryTableOwnerCol"><a href="../../mx/messaging/MessageAgent.html">MessageAgent</a></td></tr><tr class="hideInheritedMethod"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="../../mx/messaging/MessageAgent.html#initialized()" class="signatureLink">initialized</a>(document:Object, id:String):void</div><div class="summaryTableDescription">
Called after the implementing object has been created
and all properties specified on the tag have been assigned.</div></td><td class="summaryTableOwnerCol"><a href="../../mx/messaging/MessageAgent.html">MessageAgent</a></td></tr><tr class="hideInheritedMethod"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="../../mx/messaging/MessageAgent.html#logout()" class="signatureLink">logout</a>():void</div><div class="summaryTableDescription">
Logs the MessageAgent out from its remote destination.</div></td><td class="summaryTableOwnerCol"><a href="../../mx/messaging/MessageAgent.html">MessageAgent</a></td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#receive()" class="signatureLink">receive</a>(timestamp:Number = 0):void</div><div class="summaryTableDescription">
Requests any messages that are queued for this Consumer on the server.</div></td><td class="summaryTableOwnerCol">AbstractConsumer</td></tr><tr class="hideInheritedMethod"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="../../mx/messaging/MessageAgent.html#setCredentials()" class="signatureLink">setCredentials</a>(username:String, password:String, charset:String = null):void</div><div class="summaryTableDescription">
Sets the credentials that the MessageAgent uses to authenticate to
destinations.</div></td><td class="summaryTableOwnerCol"><a href="../../mx/messaging/MessageAgent.html">MessageAgent</a></td></tr><tr class="hideInheritedMethod"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="../../mx/messaging/MessageAgent.html#setRemoteCredentials()" class="signatureLink">setRemoteCredentials</a>(username:String, password:String, charset:String = null):void</div><div class="summaryTableDescription">
Sets the remote credentials that will be passed through to the remote destination
for authenticating to secondary systems.</div></td><td class="summaryTableOwnerCol"><a href="../../mx/messaging/MessageAgent.html">MessageAgent</a></td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#subscribe()" class="signatureLink">subscribe</a>(clientId:String = null):void</div><div class="summaryTableDescription">
Subscribes to the remote destination.</div></td><td class="summaryTableOwnerCol">AbstractConsumer</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#unsubscribe()" class="signatureLink">unsubscribe</a>(preserveDurable:Boolean = false):void</div><div class="summaryTableDescription">
Unsubscribes from the remote destination.</div></td><td class="summaryTableOwnerCol">AbstractConsumer</td></tr></table></div><a name="protectedMethodSummary"></a><div class="summarySection"><div class="summaryTableTitle">Protected Methods </div><div class="showHideLinks"><div id="hideInheritedProtectedMethod" class="hideInheritedProtectedMethod"><a class="showHideLink" href="#protectedMethodSummary" onclick="javascript:setInheritedVisible(false,'ProtectedMethod');"><img class="showHideLinkImage" src="../../images/expanded.gif"> Show Inherited Protected Methods</a></div><div id="showInheritedProtectedMethod" class="showInheritedProtectedMethod"><a class="showHideLink" href="#protectedMethodSummary" onclick="javascript:setInheritedVisible(true,'ProtectedMethod');"><img class="showHideLinkImage" src="../../images/collapsed.gif"> Show Inherited Protected Methods</a></div></div><table cellspacing="0" cellpadding="3" class="summaryTable " id="summaryTableProtectedMethod"><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="#buildSubscribeMessage()" class="signatureLink">buildSubscribeMessage</a>():<a href="../../mx/messaging/messages/CommandMessage.html">CommandMessage</a></div><div class="summaryTableDescription">
Returns a subscribe message.</div></td><td class="summaryTableOwnerCol">AbstractConsumer</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#buildUnsubscribeMessage()" class="signatureLink">buildUnsubscribeMessage</a>(preserveDurable:Boolean):<a href="../../mx/messaging/messages/CommandMessage.html">CommandMessage</a></div><div class="summaryTableDescription">
Returns an unsubscribe message.</div></td><td class="summaryTableOwnerCol">AbstractConsumer</td></tr><tr class="hideInheritedProtectedMethod"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="../../mx/messaging/MessageAgent.html#handleAuthenticationFault()" class="signatureLink">handleAuthenticationFault</a>(errMsg:<a href="../../mx/messaging/messages/ErrorMessage.html">ErrorMessage</a>, msg:<a href="../../mx/messaging/messages/IMessage.html">IMessage</a>):void</div><div class="summaryTableDescription">
Handles the authentication fault on the server.</div></td><td class="summaryTableOwnerCol"><a href="../../mx/messaging/MessageAgent.html">MessageAgent</a></td></tr><tr class="hideInheritedProtectedMethod"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="../../mx/messaging/MessageAgent.html#initChannelSet()" class="signatureLink">initChannelSet</a>(message:<a href="../../mx/messaging/messages/IMessage.html">IMessage</a>):void</div><div class="summaryTableDescription">
Used to automatically initialize the channelSet property for the
MessageAgent before it connects for the first time.</div></td><td class="summaryTableOwnerCol"><a href="../../mx/messaging/MessageAgent.html">MessageAgent</a></td></tr><tr class="hideInheritedProtectedMethod"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="../../mx/messaging/MessageAgent.html#internalSend()" class="signatureLink">internalSend</a>(message:<a href="../../mx/messaging/messages/IMessage.html">IMessage</a>, waitForClientId:Boolean = true):void</div><div class="summaryTableDescription">
Sends a Message from the MessageAgent to its destination using the
agent's ChannelSet.</div></td><td class="summaryTableOwnerCol"><a href="../../mx/messaging/MessageAgent.html">MessageAgent</a></td></tr><tr class="hideInheritedProtectedMethod"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="../../mx/messaging/MessageAgent.html#reAuthorize()" class="signatureLink">reAuthorize</a>(msg:<a href="../../mx/messaging/messages/IMessage.html">IMessage</a>):void</div><div class="summaryTableDescription">
This function should be overriden by sublasses to implement reauthentication due to
server session time-out behavior specific to them.</div></td><td class="summaryTableOwnerCol"><a href="../../mx/messaging/MessageAgent.html">MessageAgent</a></td></tr></table></div><a name="eventSummary"></a><div class="summarySection"><div class="summaryTableTitle">Events</div><div class="showHideLinks"><div id="hideInheritedEvent" class="hideInheritedEvent"><a class="showHideLink" href="#eventSummary" onclick="javascript:setInheritedVisible(false,'Event');"><img class="showHideLinkImage" src="../../images/expanded.gif"> Hide Inherited Events</a></div><div id="showInheritedEvent" class="showInheritedEvent"><a class="showHideLink" href="#eventSummary" onclick="javascript:setInheritedVisible(true,'Event');"><img class="showHideLinkImage" src="../../images/collapsed.gif"> Show Inherited Events</a></div></div><table cellspacing="0" cellpadding="3" class="summaryTable " id="summaryTableEvent"><tr><th>&nbsp;</th><th colspan="2">Event</th><th> Summary </th><th class="summaryTableOwnerCol">Defined By</th></tr><tr class="hideInheritedEvent"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="../../mx/messaging/MessageAgent.html#event:acknowledge" class="signatureLink">acknowledge</a></div></td><td class="summaryTableDescription summaryTableCol">Dispatched when an acknowledge message is received for a sent message.</td><td class="summaryTableOwnerCol"><a href="../../mx/messaging/MessageAgent.html">MessageAgent</a></td></tr><tr class="hideInheritedEvent"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="../../mx/messaging/MessageAgent.html#event:channelConnect" class="signatureLink">channelConnect</a></div></td><td class="summaryTableDescription summaryTableCol">Dispatched when the underlying Channel the MessageAgent is using connects.</td><td class="summaryTableOwnerCol"><a href="../../mx/messaging/MessageAgent.html">MessageAgent</a></td></tr><tr class="hideInheritedEvent"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="../../mx/messaging/MessageAgent.html#event:channelDisconnect" class="signatureLink">channelDisconnect</a></div></td><td class="summaryTableDescription summaryTableCol">Dispatched when the underlying Channel the MessageAgent is using disconnects.</td><td class="summaryTableOwnerCol"><a href="../../mx/messaging/MessageAgent.html">MessageAgent</a></td></tr><tr class="hideInheritedEvent"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="../../mx/messaging/MessageAgent.html#event:channelFault" class="signatureLink">channelFault</a></div></td><td class="summaryTableDescription summaryTableCol">Dispatched when the underlying Channel the MessageAgent is using faults.</td><td class="summaryTableOwnerCol"><a href="../../mx/messaging/MessageAgent.html">MessageAgent</a></td></tr><tr class="hideInheritedEvent"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="../../mx/messaging/MessageAgent.html#event:fault" class="signatureLink">fault</a></div></td><td class="summaryTableDescription summaryTableCol">Dispatched when a message fault occurs.</td><td class="summaryTableOwnerCol"><a href="../../mx/messaging/MessageAgent.html">MessageAgent</a></td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#event:message" class="signatureLink">message</a></div></td><td class="summaryTableDescription summaryTableCol">Dispatched when a message is received by the Consumer.</td><td class="summaryTableOwnerCol">AbstractConsumer</td></tr><tr class="hideInheritedEvent"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="../../mx/messaging/MessageAgent.html#event:propertyChange" class="signatureLink">propertyChange</a></div></td><td class="summaryTableDescription summaryTableCol">Dispatched when the connected property of the MessageAgent changes.</td><td class="summaryTableOwnerCol"><a href="../../mx/messaging/MessageAgent.html">MessageAgent</a></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="_shouldBeSubscribed"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">_shouldBeSubscribed</td><td class="detailHeaderType">property</td></tr></table><div class="detailBody"><code>protected var _shouldBeSubscribed: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 Versions :&nbsp;</b></td><td>BlazeDS 4, LCDS 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>
Flag indicating whether this consumer should be subscribed or not.
</p></div><a name="propertyDetail"></a><a name="maxFrequency"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">maxFrequency</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>maxFrequency:uint</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 Versions :&nbsp;</b></td><td>BlazeDS 4, LCDS 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>
Determines the maximum number of messages per second the Consumer wants
to receive. A server that understands this value will use it as an input
while it determines how fast to send messages to the Consumer. Default is 0
which means Consumer does not have a preference for the message rate.
Note that this property should be set before the Consumer subscribes and
any changes after Consumer subscription will not have any effect until
Consumer unsubscribes and resubscribes.
</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 maxFrequency():uint</code><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function set maxFrequency(value:uint):void</code><br/></div><a name="propertyDetail"></a><a name="resubscribeAttempts"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">resubscribeAttempts</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>resubscribeAttempts:int</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 Versions :&nbsp;</b></td><td>BlazeDS 4, LCDS 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 number of resubscribe attempts that the Consumer makes in the event
that the destination is unavailable or the connection to the destination fails.
A value of -1 enables infinite attempts.
A value of zero disables resubscribe attempts.
<p>
Resubscribe attempts are made at a constant rate according to the resubscribe interval
value. When a resubscribe attempt is made if the underlying channel for the Consumer is not
connected or attempting to connect the channel will start a connect attempt.
Subsequent Consumer resubscribe attempts that occur while the underlying
channel connect attempt is outstanding are effectively ignored until
the outstanding channel connect attempt succeeds or fails.
</p>
</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 resubscribeAttempts():int</code><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function set resubscribeAttempts(value:int):void</code><br/><p><span class="label">See also</span></p><div class="seeAlso"><a href="Consumer.html#resubscribeInterval" target="">mx.messaging.Consumer.resubscribeInterval</a></div></div><a name="propertyDetail"></a><a name="resubscribeInterval"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">resubscribeInterval</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>resubscribeInterval:int</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 Versions :&nbsp;</b></td><td>BlazeDS 4, LCDS 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 number of milliseconds between resubscribe attempts.
If a Consumer doesn't receive an acknowledgement for a subscription
request, it will wait the specified number of milliseconds before
attempting to resubscribe.
Setting the value to zero disables resubscriptions.
<p>
Resubscribe attempts are made at a constant rate according to this
value. When a resubscribe attempt is made if the underlying channel for the Consumer is not
connected or attempting to connect the channel will start a connect attempt.
Subsequent Consumer resubscribe attempts that occur while the underlying
channel connect attempt is outstanding are effectively ignored until
the outstanding channel connect attempt succeeds or fails.
</p>
</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 resubscribeInterval():int</code><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function set resubscribeInterval(value:int):void</code><br/><br/><span class="label"> Throws </span><br/><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>ArgumentError </code> &mdash; If the assigned value is negative.
</td></tr></table><p><span class="label">See also</span></p><div class="seeAlso"><a href="Consumer.html#resubscribeInterval" target="">mx.messaging.Consumer.resubscribeInterval</a></div></div><a name="propertyDetail"></a><a name="subscribed"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">subscribed</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>subscribed:Boolean</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 Versions :&nbsp;</b></td><td>BlazeDS 4, LCDS 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>
Indicates whether the Consumer is currently subscribed. The <code>propertyChange</code>
event is dispatched when this property changes.
</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 subscribed():Boolean</code><br/></div><a name="propertyDetail"></a><a name="timestamp"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">timestamp</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>timestamp:Number</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 Versions :&nbsp;</b></td><td>BlazeDS 4, LCDS 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>
Contains the timestamp of the most recent message this Consumer
has received.
This value is passed to the destination in a <code>receive()</code> call
to request that it deliver messages for the Consumer from the timestamp
forward.
All messages with a timestamp value greater than the
<code>timestamp</code> value will be returned during a poll operation.
Setting this value to -1 will retrieve all cached messages from the
destination.
</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 timestamp():Number</code><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function set timestamp(value:Number):void</code><br/></div><a name="constructorDetail"></a><div class="detailSectionHeader">Constructor Detail</div><a name="AbstractConsumer()"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">AbstractConsumer</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">Constructor</td></tr></table><div class="detailBody"><code>public function AbstractConsumer()</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 Versions :&nbsp;</b></td><td>BlazeDS 4, LCDS 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>
Constructs a Consumer.
</p><br/><span class="label"> Example </span><br/><div class="detailBody"> <div class="listing" version="3.0"><pre>
function initConsumer():void
{
var consumer:Consumer = new Consumer();
consumer.destination = "NASDAQ";
consumer.selector = "operation IN ('Bid','Ask')";
consumer.addEventListener(MessageEvent.MESSAGE, messageHandler);
consumer.subscribe();
}
function messageHandler(event:MessageEvent):void
{
var msg:IMessage = event.message;
var info:Object = msg.body;
trace("-App recieved message: " + msg.toString());
}
</pre></div>
</div></div><a name="methodDetail"></a><div class="detailSectionHeader">Method Detail</div><a name="buildSubscribeMessage()"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">buildSubscribeMessage</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td></tr></table><div class="detailBody"><code> protected function buildSubscribeMessage():<a href="../../mx/messaging/messages/CommandMessage.html">CommandMessage</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 Versions :&nbsp;</b></td><td>BlazeDS 4, LCDS 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>
Returns a subscribe message.
This method should be overridden by subclasses if they need custom
subscribe messages.
</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/messaging/messages/CommandMessage.html">CommandMessage</a></code> &mdash; The subscribe CommandMessage.
</td></tr></table></div><a name="buildUnsubscribeMessage()"></a><a name="buildUnsubscribeMessage(Boolean)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">buildUnsubscribeMessage</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> protected function buildUnsubscribeMessage(preserveDurable:Boolean):<a href="../../mx/messaging/messages/CommandMessage.html">CommandMessage</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 Versions :&nbsp;</b></td><td>BlazeDS 4, LCDS 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>
Returns an unsubscribe message.
This method should be overridden by subclasses if they need custom
unsubscribe messages.
</p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">preserveDurable</span>:Boolean</code> &mdash; - when true, durable JMS subscriptions are not destroyed
allowing consumers to later resubscribe and receive missed messages
</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/messaging/messages/CommandMessage.html">CommandMessage</a></code> &mdash; The unsubscribe CommandMessage.
</td></tr></table></div><a name="disconnect()"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">disconnect</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>override public function disconnect():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 Versions :&nbsp;</b></td><td>BlazeDS 4, LCDS 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>
Disconnects the Consumer from its remote destination.
This method should be invoked on a Consumer that is no longer
needed by an application after unsubscribing.
This method does not wait for outstanding network operations to complete
and does not send an unsubscribe message to the server.
After invoking disconnect(), the Consumer will report that it is in an
disconnected, unsubscribed state because it will not receive any more
messages until it has reconnected and resubscribed.
Disconnecting stops automatic resubscription attempts if they are running.
</p></div><a name="receive()"></a><a name="receive(Number)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">receive</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function receive(timestamp:Number = 0):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 Versions :&nbsp;</b></td><td>BlazeDS 4, LCDS 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>
Requests any messages that are queued for this Consumer on the server.
This method should only be used for Consumers that subscribe over non-realtime,
non-polling channels.
This method is a no-op if the Consumer is not subscribed.
</p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">timestamp</span>:Number</code> (default = <code>0</code>)<code></code> &mdash; This argument is deprecated and is ignored.
</td></tr></table></p></div><a name="subscribe()"></a><a name="subscribe(String)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">subscribe</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function subscribe(clientId:String = null):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 Versions :&nbsp;</b></td><td>BlazeDS 4, LCDS 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>
Subscribes to the remote destination.
</p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">clientId</span>:String</code> (default = <code>null</code>)<code></code> &mdash; The client id to subscribe with. Use null for non-durable Consumers. If the subscription is durable, a consistent
value must be supplied every time the Consumer subscribes in order
to reconnect to the correct durable subscription in the remote destination.
</td></tr></table></p><br/><span class="label">Throws</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../mx/messaging/errors/InvalidDestinationError.html">InvalidDestinationError</a> </code> &mdash; If no destination is set.
</td></tr></table></div><a name="unsubscribe()"></a><a name="unsubscribe(Boolean)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">unsubscribe</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function unsubscribe(preserveDurable:Boolean = false):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 Versions :&nbsp;</b></td><td>BlazeDS 4, LCDS 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>
Unsubscribes from the remote destination. In the case of durable JMS
subscriptions, this will destroy the durable subscription on the JMS server.
</p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">preserveDurable</span>:Boolean</code> (default = <code>false</code>)<code></code> &mdash; - when true, durable JMS subscriptions are not destroyed
allowing consumers to later resubscribe and receive missed messages
</td></tr></table></p></div><div class="detailSectionHeader"> Event Detail </div><a name="event:message"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">message</td><td class="detailHeaderType"> Event </td></tr></table><div class="detailBody"><span class="label">Event Object Type: </span><a href="../../mx/messaging/events/MessageEvent.html"><code>mx.messaging.events.MessageEvent</code></a><br/><span class="label">MessageEvent.type property = </span><a href="../../mx/messaging/events/MessageEvent.html#MESSAGE"><code>mx.messaging.events.MessageEvent.MESSAGE</code></a><br/><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 Versions :&nbsp;</b></td><td>BlazeDS 4, LCDS 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>
Dispatched when a message is received by the Consumer.
</p>
The MESSAGE event type; dispatched upon receipt of a message.
<p>The value of this constant is <code>"message"</code>.</p>
<p>The properties of the event object have the following values:</p>
<table class="innertable" ><tr><th>Property</th><th>Value</th></tr><tr><td><code>bubbles</code></td><td>false</td></tr><tr><td><code>cancelable</code></td><td>false</td></tr><tr><td><code>currentTarget</code></td><td>The Object that defines the
event listener that handles the event. For example, if you use
<code>myButton.addEventListener()</code> to register an event listener,
myButton is the value of the <code>currentTarget</code>. </td></tr><tr><td><code>message</code></td><td>The message associated with this event.</td></tr><tr><td><code>target</code></td><td>The Object that dispatched the event;
it is not always the Object listening for the event.
Use the <code>currentTarget</code> property to always access the
Object listening for the event.</td></tr></table>
</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 -->