Pakket | mx.messaging |
Klasse | public class ChannelSet |
Overerving | ChannelSet ![]() ![]() |
Subklassen | AdvancedChannelSet |
Taalversie: | ActionScript 3.0 |
Productversies: | BlazeDS 4, Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Runtimeversies: | Flash Player 9, AIR 1.1 |
Standaard-MXML-eigenschapchannels
Eigenschap | Gedefinieerd door | ||
---|---|---|---|
connected : Boolean [alleen-lezen]
Indicates whether the ChannelSet is connected. | ChannelSet | ||
![]() | constructor : Object
Verwijzing naar het klasseobject of de constructorfunctie van een bepaalde objectinstantie. | Object | |
heartbeatInterval : int
The number of milliseconds between heartbeats sent to the remote
host while this ChannelSet is actively connected but idle. | ChannelSet |
Methode | Gedefinieerd door | ||
---|---|---|---|
![]() | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registreert een gebeurtenislistenerobject bij een object EventDispatcher, zodat de listener een melding van een gebeurtenis ontvangt. | EventDispatcher | |
![]() |
Verzendt een gebeurtenis naar de gebeurtenisstroom. | EventDispatcher | |
![]() |
Controleert of het object EventDispatcher listeners heeft geregistreerd voor een specifiek type gebeurtenis. | EventDispatcher | |
![]() |
Geeft aan of voor een object een opgegeven eigenschap is gedefinieerd. | Object | |
![]() |
Geeft aan of een instantie van de klasse Object zich in de prototypeketen van het object bevindt dat als parameter is opgegeven. | Object | |
Logs the ChannelSet out from the server. | ChannelSet | ||
![]() |
Geeft aan of de opgegeven eigenschap bestaat en kan worden opgesomd. | Object | |
![]() |
Verwijdert een listener uit het object EventDispatcher. | EventDispatcher | |
![]() |
Stelt de beschikbaarheid van een dynamische eigenschap voor lusbewerkingen in. | Object | |
![]() |
Geeft de tekenreeksweergave van dit object weer, geformatteerd volgens de locatiespecifieke conventies. | Object | |
![]() |
Retourneert de primitieve waarde van het opgegeven object. | Object | |
![]() |
Controleert of een gebeurtenislistener is geregistreerd bij dit object EventDispatcher of een van de voorouders voor het opgegeven type gebeurtenis. | EventDispatcher |
Methode | Gedefinieerd door | ||
---|---|---|---|
Redispatches message events from the currently connected Channel. | ChannelSet |
Gebeurtenis | Overzicht | Gedefinieerd door | ||
---|---|---|---|---|
![]() | [uitgezonden gebeurtenis] Wordt verzonden wanneer Flash Player of de AIR-toepassing de besturingssysteemfocus krijgt en actief wordt. | EventDispatcher | ||
![]() | [uitgezonden gebeurtenis] Wordt verzonden wanneer Flash Player of de AIR-toepassing de systeemfocus verliest en inactief wordt. | EventDispatcher |
connected | eigenschap |
heartbeatInterval | eigenschap |
heartbeatInterval:int
The number of milliseconds between heartbeats sent to the remote host while this ChannelSet is actively connected but idle. Any outbound message traffic will delay heartbeats temporarily, with this number of milliseconds elapsing after the last sent message before the next heartbeat is issued.
This property is useful for applications that connect to a remote host to received pushed updates and are not actively sending any messages, but still wish to be notified of a dropped connection even when the networking layer fails to provide such notification directly. By issuing periodic heartbeats the client can force the networking layer to report a timeout if the underlying connection has dropped without notification and the application can respond to the disconnect appropriately.
Any non-positive value disables heartbeats to the remote host. The default value is 0 indicating that heartbeats are disabled. If the application sets this value it should prefer a longer rather than shorter interval, to avoid placing unnecessary load on the remote host. As an illustrative example, low-level TCP socket keep-alives generally default to an interval of 2 hours. That is a longer interval than most applications that enable heartbeats will likely want to use, but it serves as a clear precedent to prefer a longer interval over a shorter interval.
If the currently connected underlying Channel issues poll requests to the remote host, heartbeats are suppressed because the periodic poll requests effectively take their place.
Implementatie
public function get heartbeatInterval():int
public function set heartbeatInterval(value:int):void
logout | () | methode |
public function logout(agent:MessageAgent = null):mx.rpc:AsyncToken
Logs the ChannelSet out from the server. Unlike other operations on Channels and the ChannelSet, this operation returns an AsyncToken that client code may add a responder to in order to handle success or failure directly. If logout is successful any credentials that have been cached for use in automatic reconnects are cleared for the ChannelSet and its Channels and their authenticated state is set to false. If the ChannelSet is not connected to the server when this method is invoked it will trigger a connect attempt, and if successful, send a logout command to the server.
The MessageAgent argument is present to support legacy logout behavior and client code that
invokes this method should not pass a MessageAgent reference. Just invoke logout()
passing no arguments.
This method is also invoked by service components from their logout()
methods, and these components pass a MessageAgent reference to this method when they logout.
The presence of this argument is the trigger to execute legacy logout behavior that differs
from the new behavior described above.
Legacy behavior only sends a logout request to the server if the client is connected
and authenticated.
If these conditions are not met the legacy behavior for this method is to do nothing other
than clear any credentials that have been cached for use in automatic reconnects.
Parameters
agent:MessageAgent (default = null ) — Legacy argument. The MessageAgent that is initiating the logout.
|
mx.rpc:AsyncToken — Returns a token that client code may
add a responder to in order to handle success or failure directly.
|
Gegenereerde uitzondering
IllegalOperationError — if a login or logout operation is currently in progress.
|
messageHandler | () | methode |
protected function messageHandler(event:MessageEvent):void
Redispatches message events from the currently connected Channel.
Parameters
event:MessageEvent — The MessageEvent from the Channel.
|
Wed Jun 13 2018, 11:42 AM Z