Paket | mx.messaging |
Klass | public class ChannelSet |
Arv | ChannelSet ![]() ![]() |
Underklasser | AdvancedChannelSet |
Språkversion: | ActionScript 3.0 |
Produktversioner: | BlazeDS 4, Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Körningsmiljöversioner: | Flash Player 9, AIR 1.1 |
MXML-standardegenskapchannels
Egenskap | Definieras med | ||
---|---|---|---|
connected : Boolean [skrivskyddad]
Indicates whether the ChannelSet is connected. | ChannelSet | ||
![]() | constructor : Object
En referens till klassobjektet eller konstruktorfunktionen för en given objektinstans. | Object | |
heartbeatInterval : int
The number of milliseconds between heartbeats sent to the remote
host while this ChannelSet is actively connected but idle. | ChannelSet |
Metod | Definieras med | ||
---|---|---|---|
![]() | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registrerar ett händelseavlyssnarobjekt för ett EventDispatcher-objekt så att avlyssnaren får meddelanden om händelser. | EventDispatcher | |
![]() |
Skickar en händelse till händelseflödet. | EventDispatcher | |
![]() |
Kontrollerar om EventDispatcher-objektet har några avlyssnare registrerade för en viss typ av händelse. | EventDispatcher | |
![]() |
Anger om det finns en egenskap angiven för ett objekt. | Object | |
![]() |
Anger om en instans av klassen Object finns i prototypkedjan för objektet som anges som parameter. | Object | |
Logs the ChannelSet out from the server. | ChannelSet | ||
![]() |
Anger om den angivna egenskapen finns och är uppräkningsbar. | Object | |
![]() |
Tar bort en avlyssnare från EventDispatcher-objektet. | EventDispatcher | |
![]() |
Anger tillgänglighet för en dynamisk egenskap för slingåtgärder. | Object | |
![]() |
Returnerar det här objektets strängrepresentation, formaterad i enlighet med språkspecifika konventioner. | Object | |
![]() |
Returnerar det angivna objektets primitiva värde. | Object | |
![]() |
Kontrollerar om en händelseavlyssnare är registrerad för det här EventDispatcher-objektet eller något av dess överordnade objekt för den angivna händelsetypen. | EventDispatcher |
Metod | Definieras med | ||
---|---|---|---|
Redispatches message events from the currently connected Channel. | ChannelSet |
Händelse | Sammanfattning | Definieras med | ||
---|---|---|---|---|
![]() | [utsändningshändelse] Skickas när Flash Player eller AIR får operativsystemfokus och blir aktivt. | EventDispatcher | ||
![]() | [utsändningshändelse] Skickas när Flash Player eller AIR förlorar operativsystemfokus och blir inaktivt. | EventDispatcher |
connected | egenskap |
heartbeatInterval | egenskap |
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.
Implementering
public function get heartbeatInterval():int
public function set heartbeatInterval(value:int):void
logout | () | metod |
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.
Parametrar
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.
|
Utlöser
IllegalOperationError — if a login or logout operation is currently in progress.
|
messageHandler | () | metod |
protected function messageHandler(event:MessageEvent):void
Redispatches message events from the currently connected Channel.
Parametrar
event:MessageEvent — The MessageEvent from the Channel.
|
Tue Jun 12 2018, 01:40 PM Z