套件 | mx.messaging.channels |
類別 | public class StreamingConnectionHandler |
繼承 | StreamingConnectionHandler EventDispatcher Object |
語言版本: | ActionScript 3.0 |
產品版本: | BlazeDS 4, Adobe Digital Enterprise Platform Data Services for Java EE 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
屬性 | 定義自 | ||
---|---|---|---|
channel : Channel
The Channel that uses this class. | StreamingConnectionHandler | ||
chunkBuffer : ByteArray
Byte buffer used to store the current chunk from the remote endpoint. | StreamingConnectionHandler | ||
dataBytesToRead : int = -1
Counter that keeps track of how many data bytes remain to be read for the current chunk. | StreamingConnectionHandler | ||
dataOffset : int
Index into the chunk buffer pointing to the first byte of chunk data. | StreamingConnectionHandler |
方法 | 定義自 | ||
---|---|---|---|
Constructor. | StreamingConnectionHandler | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
會在 EventDispatcher 物件註冊事件偵聽程式,以便讓偵聽程式收到事件的通知。 | EventDispatcher | ||
Used by the streaming channels to shut down the streaming connection. | StreamingConnectionHandler | ||
會將事件傳送到事件流程。 | EventDispatcher | ||
會檢查 EventDispatcher 物件是否有對特定的事件類型註冊偵聽程式。 | EventDispatcher | ||
指出物件是否有已定義的指定屬性。 | Object | ||
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。 | Object | ||
Used by the streaming channels to set up the streaming connection if
necessary and issue the open request to the server. | StreamingConnectionHandler | ||
指出指定的屬性是否存在,以及是否可列舉。 | Object | ||
會從 EventDispatcher 物件移除偵聽程式。 | EventDispatcher | ||
為迴圈作業設定動態屬性的可用性。 | Object | ||
傳回代表此物件的字串,根據地區特定慣例進行格式化。 | Object | ||
會傳回指定之物件的字串形式。 | Object | ||
會傳回指定之物件的基本值。 | Object | ||
檢查此 EventDispatcher 物件是否已註冊事件偵聽程式,或者此物件的任何祖系已為特定事件類型註冊事件偵聽程式。 | EventDispatcher |
方法 | 定義自 | ||
---|---|---|---|
Used by the streamProgressHandler to read a message. | StreamingConnectionHandler |
事件 | 摘要 | 定義自 | ||
---|---|---|---|---|
[廣播事件] 當 Flash Player 或 AIR 應用程式取得作業系統焦點並成為作用中時傳送。 | EventDispatcher | |||
[廣播事件] 當 Flash Player 或 AIR 應用程式失去作業系統焦點並成為非作用中時傳送。 | EventDispatcher | |||
Dispatched when the StreamingConnectionHandler receives a status command from the server. | StreamingConnectionHandler |
常數 | 定義自 | ||
---|---|---|---|
DISCONNECT_CODE : String = "disconnect" [靜態]
The code for the StatusEvent dispatched by this handler when a disconnect
command is received from the server. | StreamingConnectionHandler |
channel | 屬性 |
protected var channel:Channel
語言版本: | ActionScript 3.0 |
產品版本: | BlazeDS 4, Adobe Digital Enterprise Platform Data Services for Java EE 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
The Channel that uses this class.
chunkBuffer | 屬性 |
protected var chunkBuffer:ByteArray
語言版本: | ActionScript 3.0 |
產品版本: | BlazeDS 4, Adobe Digital Enterprise Platform Data Services for Java EE 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Byte buffer used to store the current chunk from the remote endpoint. Once a full chunk has been buffered, a message instance encoded in binary AMF format can be read from the chunk and dispatched.
dataBytesToRead | 屬性 |
protected var dataBytesToRead:int = -1
語言版本: | ActionScript 3.0 |
產品版本: | BlazeDS 4, Adobe Digital Enterprise Platform Data Services for Java EE 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Counter that keeps track of how many data bytes remain to be read for the current chunk. A sentinal value of -1 indicates an initial state (either waiting for the first chunk or just finished parsing the previous chunk).
dataOffset | 屬性 |
protected var dataOffset:int
語言版本: | ActionScript 3.0 |
產品版本: | BlazeDS 4, Adobe Digital Enterprise Platform Data Services for Java EE 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Index into the chunk buffer pointing to the first byte of chunk data.
StreamingConnectionHandler | () | 建構函式 |
public function StreamingConnectionHandler(channel:Channel, log:ILogger)
語言版本: | ActionScript 3.0 |
產品版本: | BlazeDS 4, Adobe Digital Enterprise Platform Data Services for Java EE 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Constructor.
參數channel:Channel — The Channel that uses this class.
| |
log:ILogger — Reference to the logger for the associated Channel.
|
closeStreamingConnection | () | 方法 |
public function closeStreamingConnection():void
語言版本: | ActionScript 3.0 |
產品版本: | BlazeDS 4, Adobe Digital Enterprise Platform Data Services for Java EE 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Used by the streaming channels to shut down the streaming connection.
openStreamingConnection | () | 方法 |
public function openStreamingConnection(appendToURL:String = null):void
語言版本: | ActionScript 3.0 |
產品版本: | BlazeDS 4, Adobe Digital Enterprise Platform Data Services for Java EE 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Used by the streaming channels to set up the streaming connection if necessary and issue the open request to the server.
參數
appendToURL:String (default = null ) — The string to append such as session id to the endpoint
url while making the streaming connection request.
|
readMessage | () | 方法 |
protected function readMessage():IMessage
語言版本: | ActionScript 3.0 |
產品版本: | BlazeDS 4, Adobe Digital Enterprise Platform Data Services for Java EE 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Used by the streamProgressHandler to read a message. Default implementation returns null and subclasses must override this method.
傳回值IMessage — Returns the message that was read.
|
status | 事件 |
flash.events.StatusEvent
屬性 StatusEvent.type =
flash.events.StatusEvent
語言版本: | ActionScript 3.0 |
產品版本: | BlazeDS 4, Adobe Digital Enterprise Platform Data Services for Java EE 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Dispatched when the StreamingConnectionHandler receives a status command from the server.
DISCONNECT_CODE | 常數 |
public static const DISCONNECT_CODE:String = "disconnect"
語言版本: | ActionScript 3.0 |
產品版本: | BlazeDS 4, Adobe Digital Enterprise Platform Data Services for Java EE 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
The code for the StatusEvent dispatched by this handler when a disconnect command is received from the server.
Tue Jun 12 2018, 03:47 PM Z