Paket | mx.messaging |
Sınıf | public class ChannelSet |
Miras Alma | ChannelSet ![]() ![]() |
Alt Sınıflar | AdvancedChannelSet |
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümleri: | BlazeDS 4, Adobe Digital Enterprise Platform Data Services for Java EE 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
Varsayılan MXML Özelliğichannels
Özellik | Tanımlayan: | ||
---|---|---|---|
connected : Boolean [salt okunur]
Indicates whether the ChannelSet is connected. | ChannelSet | ||
![]() | constructor : Object
Belirli bir nesne örneği için sınıf nesnesine veya yapıcı işlevine bir başvuru. | Object | |
heartbeatInterval : int
The number of milliseconds between heartbeats sent to the remote
host while this ChannelSet is actively connected but idle. | ChannelSet |
Yöntem | Tanımlayan: | ||
---|---|---|---|
![]() | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
EventDispatcher nesnesi olan bir olay dinleyici nesnesini, dinleyicinin bir olayın bildirimini alması için kaydeder. | EventDispatcher | |
![]() |
Olay akışına bir olay gönderir. | EventDispatcher | |
![]() |
EventDispatcher nesnesinin belirli bir olay türü için kayıtlı dinleyicisi olup olmadığını kontrol eder. | EventDispatcher | |
![]() |
Bir nesnenin belirli bir özelliğinin tanımlı olup olmadığını gösterir. | Object | |
![]() |
Object sınıfının bir örneğinin parametre olarak belirtilen nesnenin prototip zincirinde olup olmadığını gösterir. | Object | |
Logs the ChannelSet out from the server. | ChannelSet | ||
![]() |
Belirtilen özelliğin bulunup bulunmadığını ve numaralandırılabilir olup olmadığını gösterir. | Object | |
![]() |
EventDispatcher nesnesinden bir dinleyiciyi kaldırır. | EventDispatcher | |
![]() |
Dinamik bir özelliğin döngü işlemlerinde kullanılabilirliğini ayarlar. | Object | |
![]() |
Bu nesnenin, yerel ayara özel kurallara göre biçimlendirilmiş dize temsilini döndürür. | Object | |
![]() |
Belirtilen nesnenin temel değerini döndürür. | Object | |
![]() |
Bir olay dinleyicisinin bu EventDispatcher nesnesiyle mi, yoksa onun belirtilen olay türüne yönelik üst öğelerinden biriyle mi kayıtlı olduğunu kontrol eder. | EventDispatcher |
Yöntem | Tanımlayan: | ||
---|---|---|---|
Redispatches message events from the currently connected Channel. | ChannelSet |
Olay | Özet | Tanımlayan: | ||
---|---|---|---|---|
![]() | [broadcast olayı] Flash Player veya AIR uygulaması işletim sistemi odağına gelip etkin olduğunda gönderilir. | EventDispatcher | ||
![]() | [broadcast olayı] Çalışan Flash Player veya AIR uygulaması sistem odağını kaybettiğinde ve etkin olmayan duruma geldiğinde gönderilir. | EventDispatcher |
connected | özellik |
heartbeatInterval | özellik |
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.
Uygulama
public function get heartbeatInterval():int
public function set heartbeatInterval(value:int):void
logout | () | yöntem |
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.
Parametreler
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.
|
Atar
IllegalOperationError — if a login or logout operation is currently in progress.
|
messageHandler | () | yöntem |
protected function messageHandler(event:MessageEvent):void
Redispatches message events from the currently connected Channel.
Parametreler
event:MessageEvent — The MessageEvent from the Channel.
|
Tue Jun 12 2018, 01:09 PM Z