Pacote | mx.messaging |
Classe | public class ChannelSet |
Herança | ChannelSet ![]() ![]() |
Subclasses | AdvancedChannelSet |
Versão da linguagem: | ActionScript 3.0 |
Versões de produto: | BlazeDS 4, Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Propriedade MXML padrãochannels
Propriedade | Definido por | ||
---|---|---|---|
connected : Boolean [somente leitura]
Indicates whether the ChannelSet is connected. | ChannelSet | ||
![]() | constructor : Object
Uma referência ao objeto de classe ou à função de construtor de uma determinada ocorrência de objeto. | Object | |
heartbeatInterval : int
The number of milliseconds between heartbeats sent to the remote
host while this ChannelSet is actively connected but idle. | ChannelSet |
Método | Definido por | ||
---|---|---|---|
![]() | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registra um objeto de ouvinte de evento em um objeto EventDispatcher, de forma que o ouvinte receba a notificação de um evento. | EventDispatcher | |
![]() |
Envia um evento para o fluxo de eventos. | EventDispatcher | |
![]() |
Verifica se o objeto EventDispatcher tem ouvintes registrados para um tipo específico de evento. | EventDispatcher | |
![]() |
Indica se um objeto tem uma propriedade especificada definida. | Object | |
![]() |
Indica se uma ocorrência da classe Object está na cadeia de protótipos do objeto especificado como o parâmetro. | Object | |
Logs the ChannelSet out from the server. | ChannelSet | ||
![]() |
Indica se a propriedade especificada existe e é enumerável. | Object | |
![]() |
Remove um ouvinte do objeto EventDispatcher. | EventDispatcher | |
![]() |
Define a disponibilidade de uma propriedade dinâmica para operações de repetição. | Object | |
![]() |
Retorna a representação da string deste objeto, formatado segundo as convenções específicas para a localidade. | Object | |
![]() |
Retorna o valor primitivo do objeto especificado. | Object | |
![]() |
Verifica se um ouvinte de evento está registrado nesse objeto EventDispatcher ou em qualquer um de seus ancestrais para o tipo de evento especificado. | EventDispatcher |
Método | Definido por | ||
---|---|---|---|
Redispatches message events from the currently connected Channel. | ChannelSet |
Evento | Resumo | Definido por | ||
---|---|---|---|---|
![]() | [transmissão de evento] Despachado quando o Flash Player ou o aplicativo do AIR ganha o foco do sistema operacional e está se tornando inativo. | EventDispatcher | ||
![]() | [transmissão de evento] Despachado quando o Flash Player ou o aplicativo do AIR perde o foco do sistema operacional e está se tornando inativo. | EventDispatcher |
connected | propriedade |
heartbeatInterval | propriedade |
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.
Implementação
public function get heartbeatInterval():int
public function set heartbeatInterval(value:int):void
logout | () | método |
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.
Parâmetros
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.
|
Lança
IllegalOperationError — if a login or logout operation is currently in progress.
|
messageHandler | () | método |
protected function messageHandler(event:MessageEvent):void
Redispatches message events from the currently connected Channel.
Parâmetros
event:MessageEvent — The MessageEvent from the Channel.
|
Wed Jun 13 2018, 11:10 AM Z