Pacchetto | mx.messaging |
Classe | public class ChannelSet |
Ereditarietà | ChannelSet ![]() ![]() |
Sottoclassi | AdvancedChannelSet |
Versione linguaggio: | ActionScript 3.0 |
Versioni prodotto: | BlazeDS 4, Adobe Digital Enterprise Platform Data Services per Java EE 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
Proprietà MXML predefinitachannels
Proprietà | Definito da | ||
---|---|---|---|
connected : Boolean [sola lettura]
Indicates whether the ChannelSet is connected. | ChannelSet | ||
![]() | constructor : Object
Un riferimento all'oggetto classe o alla funzione di costruzione per una determinata istanza di oggetto. | Object | |
heartbeatInterval : int
The number of milliseconds between heartbeats sent to the remote
host while this ChannelSet is actively connected but idle. | ChannelSet |
Metodo | Definito da | ||
---|---|---|---|
![]() | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registra un oggetto listener di eventi con un oggetto EventDispatcher, in modo che il listener riceva la notifica di un evento. | EventDispatcher | |
![]() |
Invia un evento nel flusso di eventi. | EventDispatcher | |
![]() |
Verifica se per l'oggetto EventDispatcher sono presenti listener registrati per un tipo specifico di evento. | EventDispatcher | |
![]() |
Indica se per un oggetto è definita una proprietà specifica. | Object | |
![]() |
Indica se un'istanza della classe Object si trova nella catena di prototipi dell'oggetto specificato come parametro. | Object | |
Logs the ChannelSet out from the server. | ChannelSet | ||
![]() |
Indica se la proprietà specificata esiste ed è enumerabile. | Object | |
![]() |
Rimuove un listener dall'oggetto EventDispatcher. | EventDispatcher | |
![]() |
Imposta la disponibilità di una proprietà dinamica per le operazioni cicliche. | Object | |
![]() |
Restituisce la rappresentazione in formato stringa di questo oggetto, formattato in base alle convenzioni specifiche per le versioni localizzate. | Object | |
![]() |
Restituisce il valore di base dell'oggetto specificato. | Object | |
![]() |
Verifica se un listener di eventi è registrato con questo oggetto EventDispatcher o qualsiasi suo antenato per il tipo di evento specificato. | EventDispatcher |
Metodo | Definito da | ||
---|---|---|---|
Redispatches message events from the currently connected Channel. | ChannelSet |
Evento | Riepilogo | Definito da | ||
---|---|---|---|---|
![]() | [evento di trasmissione] Inviato quando Flash Player o l'applicazione AIR ottiene lo stato di attivazione del sistema operativo ed entra nello stato attivo. | EventDispatcher | ||
![]() | [evento di trasmissione] Inviato quando Flash Player o l'applicazione AIR perde l'attivazione del sistema operativo e sta entrando nello stato inattivo. | EventDispatcher |
connected | proprietà |
heartbeatInterval | proprietà |
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.
Implementazione
public function get heartbeatInterval():int
public function set heartbeatInterval(value:int):void
logout | () | metodo |
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.
Parametri
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.
|
Genera
IllegalOperationError — if a login or logout operation is currently in progress.
|
messageHandler | () | metodo |
protected function messageHandler(event:MessageEvent):void
Redispatches message events from the currently connected Channel.
Parametri
event:MessageEvent — The MessageEvent from the Channel.
|
Tue Jun 12 2018, 02:44 PM Z