Package | mx.messaging.channels |
Class | public class PollingChannel |
Inheritance | PollingChannel Channel EventDispatcher Object |
Subclasses | HTTPChannel, NetConnectionChannel |
Language Version: | ActionScript 3.0 |
Product Versions: | BlazeDS 4, LiveCycle Data Services for Java EE 3 |
Runtime Versions: | Flash Player 9, AIR 1.1 |
Method | Defined By | ||
---|---|---|---|
Creates a new PollingChannel instance with the specified id. | PollingChannel | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener
receives notification of an event. | EventDispatcher | ||
Subclasses should override this method to apply any settings that may be
necessary for an individual channel. | Channel | ||
Connects the ChannelSet to the Channel. | Channel | ||
Disables polling based on the number of times enablePolling()
and disablePolling() have been invoked. | PollingChannel | ||
Disconnects the ChannelSet from the Channel. | Channel | ||
Dispatches an event into the event flow. | EventDispatcher | ||
Enables polling based on the number of times enablePolling()
and disablePolling() have been invoked. | PollingChannel | ||
Checks whether the EventDispatcher object has any listeners registered for a specific type
of event. | EventDispatcher | ||
Indicates whether an object has a specified property defined. | Object | ||
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | ||
Sends a CommandMessage to the server to logout if the Channel is connected. | Channel | ||
Initiates a poll operation if there are consumers subscribed to this channel,
and polling is enabled for this channel. | PollingChannel | ||
Indicates whether the specified property exists and is enumerable. | Object | ||
Removes a listener from the EventDispatcher object. | EventDispatcher | ||
[override]
Sends the specified message to its target destination. | PollingChannel | ||
Sets the credentials to the specified value. | Channel | ||
Sets the availability of a dynamic property for loop operations. | Object | ||
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | ||
Returns the string representation of the specified object. | Object | ||
Returns the primitive value of the specified object. | Object | ||
Checks whether an event listener is registered with this EventDispatcher object or any of
its ancestors for the specified event type. | EventDispatcher |
Constant | Defined By | ||
---|---|---|---|
LOGIN_AFTER_DISCONNECT : String = "login-after-disconnect" [static] | PollingChannel | ||
PIGGYBACKING_ENABLED : String = "piggybacking-enabled" [static] | PollingChannel | ||
POLLING_INTERVAL_LEGACY : String = "polling-interval-seconds" [static] | PollingChannel | ||
POLLING_INTERVAL_MILLIS : String = "polling-interval-millis" [static] | PollingChannel |
PollingChannel | () | Constructor |
public function PollingChannel(id:String = null, uri:String = null)
Language Version: | ActionScript 3.0 |
Product Versions: | BlazeDS 4, LiveCycle Data Services for Java EE 3 |
Runtime Versions: | Flash Player 9, AIR 1.1 |
Creates a new PollingChannel instance with the specified id. Once a PollingChannel is connected and begins polling, it will issue a poll request once every three seconds by default.
Note: The PollingChannel type should not be constructed directly. Instead create instances of protocol specific subclasses such as HTTPChannel or AMFChannel that extend it.
Parametersid:String (default = null ) — The id of this Channel.
| |
uri:String (default = null ) — The uri for this Channel.
|
disablePolling | () | method |
public function disablePolling():void
Language Version: | ActionScript 3.0 |
Product Versions: | BlazeDS 4, LiveCycle Data Services for Java EE 3 |
Runtime Versions: | Flash Player 9, AIR 1.1 |
Disables polling based on the number of times enablePolling()
and disablePolling()
have been invoked. If the net result is to disable
polling the channel stops polling.
Invoked automatically based upon subscribing or unsubscribing from a remote destination over a PollingChannel.
enablePolling | () | method |
public function enablePolling():void
Language Version: | ActionScript 3.0 |
Product Versions: | BlazeDS 4, LiveCycle Data Services for Java EE 3 |
Runtime Versions: | Flash Player 9, AIR 1.1 |
Enables polling based on the number of times enablePolling()
and disablePolling()
have been invoked. If the net result is to enable
polling the channel will poll the server on behalf of connected MessageAgents.
Invoked automatically based upon subscribing or unsubscribing from a remote destination over a PollingChannel.
poll | () | method |
public function poll():void
Language Version: | ActionScript 3.0 |
Product Versions: | BlazeDS 4, LiveCycle Data Services for Java EE 3 |
Runtime Versions: | Flash Player 9, AIR 1.1 |
Initiates a poll operation if there are consumers subscribed to this channel, and polling is enabled for this channel. Note that this method will not start a new poll if one is currently in progress.
send | () | method |
override public function send(agent:MessageAgent, message:IMessage):void
Language Version: | ActionScript 3.0 |
Product Versions: | BlazeDS 4, LiveCycle Data Services for Java EE 3 |
Runtime Versions: | Flash Player 9, AIR 1.1 |
Sends the specified message to its target destination.
Subclasses must override the internalSend()
method to
perform the actual send.
PollingChannel
will wrap outbound messages in poll requests if a poll
is not currently outstanding.
Parameters
agent:MessageAgent — The MessageAgent that is sending the message.
| |
message:IMessage — The Message to send.
|
Throws
InvalidDestinationError — If neither the MessageAgent nor the
message specify a destination.
|
LOGIN_AFTER_DISCONNECT | Constant |
protected static const LOGIN_AFTER_DISCONNECT:String = "login-after-disconnect"
PIGGYBACKING_ENABLED | Constant |
protected static const PIGGYBACKING_ENABLED:String = "piggybacking-enabled"
POLLING_INTERVAL_LEGACY | Constant |
protected static const POLLING_INTERVAL_LEGACY:String = "polling-interval-seconds"
POLLING_INTERVAL_MILLIS | Constant |
protected static const POLLING_INTERVAL_MILLIS:String = "polling-interval-millis"
Wed Nov 21 2018, 06:34 AM -08:00