blob: 71bec3b8e98228230f3df7536026435ee57bd8e8 [file] [log] [blame]
{ "type": "class",
"qname": "mx.messaging.Channel",
"baseClassname": "org.apache.royale.events.EventDispatcher"
,
"description": "The Channel class is the base message channel class that all channels in the messaging system must extend. <p>Channels are specific protocol-based conduits for messages sent between MessageAgents and remote destinations. Preconfigured channels are obtained within the framework using the <code>ServerConfig.getChannel()</code> method. You can create a Channel directly using the <code>new</code> operator and add it to a ChannelSet directly.</p> <p> Channels represent a physical connection to a remote endpoint. Channels are shared across destinations by default. This means that a client targetting different destinations may use the same Channel to communicate with these destinations. </p> <p><b>Note:</b> This class is for advanced use only. Use this class for creating custom channels like the existing RTMPChannel, AMFChannel, and HTTPChannel.</p>",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["BlazeDS 4", "LCDS 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"members": [
{ "type": "field",
"qname": "CONNECT_TIMEOUT_SECONDS",
"return": "String",
"namespace": "protected",
"bindable": [],
"details": ["static"],
"deprecated": {}},
{ "type": "field",
"qname": "ENABLE_SMALL_MESSAGES",
"return": "String",
"namespace": "protected",
"bindable": [],
"details": ["static"],
"deprecated": {}},
{ "type": "field",
"qname": "FALSE",
"return": "String",
"namespace": "protected",
"bindable": [],
"details": ["static"],
"deprecated": {}},
{ "type": "field",
"qname": "RECORD_MESSAGE_TIMES",
"return": "String",
"namespace": "protected",
"bindable": [],
"details": ["static"],
"deprecated": {}},
{ "type": "field",
"qname": "RECORD_MESSAGE_SIZES",
"return": "String",
"namespace": "protected",
"bindable": [],
"details": ["static"],
"deprecated": {}},
{ "type": "field",
"qname": "REQUEST_TIMEOUT_SECONDS",
"return": "String",
"namespace": "protected",
"bindable": [],
"details": ["static"],
"deprecated": {}},
{ "type": "field",
"qname": "SERIALIZATION",
"return": "String",
"namespace": "protected",
"bindable": [],
"details": ["static"],
"deprecated": {}},
{ "type": "field",
"qname": "TRUE",
"return": "String",
"namespace": "protected",
"bindable": [],
"details": ["static"],
"deprecated": {}},
{ "type": "method",
"qname": "mx.messaging.Channel",
"namespace": "",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Constructs an instance of a generic Channel that connects to the specified endpoint URI. <b>Note</b>: The Channel type should not be constructed directly. Instead create instances of protocol specific subclasses such as RTMPChannel or AMFChannel.",
"tags": [
{ "tagName": "param",
"values": ["id The id of this channel.", "uri The endpoint URI for this channel."]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["BlazeDS 4", "LCDS 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "",
"params": [{ "name": "id", "type": "String"},
{ "name": "uri", "type": "String"}]}
,
{ "type": "accessor",
"access": "read-only",
"return": "Array",
"qname": "channelSets",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Provides access to the ChannelSets connected to the Channel.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["BlazeDS 4", "LCDS 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-only",
"return": "Boolean",
"qname": "connected",
"namespace": "public",
"bindable": ["propertyChange"],
"details": [],
"deprecated": {},
"description": "Indicates whether this channel has established a connection to the remote destination.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["BlazeDS 4", "LCDS 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "int",
"qname": "connectTimeout",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Provides access to the connect timeout in seconds for the channel. A value of 0 or below indicates that a connect attempt will never be timed out on the client. For channels that are configured to failover, this value is the total time to wait for a connection to be established. It is not reset for each failover URI that the channel may attempt to connect to.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["BlazeDS 4", "LCDS 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-only",
"return": "String",
"qname": "endpoint",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Provides access to the endpoint for this channel. This value is calculated based on the value of the <code>uri</code> property."},
{ "type": "accessor",
"access": "read-only",
"return": "Boolean",
"qname": "recordMessageTimes",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Channel property determines the level of performance information injection - whether we inject timestamps or not.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["BlazeDS 4", "LCDS 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-only",
"return": "Boolean",
"qname": "recordMessageSizes",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Channel property determines the level of performance information injection - whether we inject message sizes or not.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["BlazeDS 4", "LCDS 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-only",
"return": "Boolean",
"qname": "reconnecting",
"namespace": "public",
"bindable": ["propertyChange"],
"details": [],
"deprecated": {},
"description": "Indicates whether this channel is in the process of reconnecting to an alternate endpoint."},
{ "type": "accessor",
"access": "read-write",
"return": "Array",
"qname": "failoverURIs",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Provides access to the set of endpoint URIs that this channel can attempt to failover to if the endpoint is clustered. <p>This property is automatically populated when clustering is enabled. If you don't use clustering, you can set your own values.</p>"},
{ "type": "accessor",
"access": "read-write",
"return": "String",
"qname": "id",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Provides access to the id of this channel."},
{ "type": "accessor",
"access": "read-only",
"return": "Boolean",
"qname": "authenticated",
"namespace": "public",
"bindable": ["propertyChange"],
"details": [],
"deprecated": {},
"description": "Indicates if this channel is authenticated."},
{ "type": "method",
"qname": "setAuthenticated",
"namespace": "mx_internal",
"bindable": [],
"details": [],
"deprecated": {},
"return": "void",
"params": [{ "name": "value", "type": "Boolean"}]}
,
{ "type": "accessor",
"access": "read-only",
"return": "String",
"qname": "protocol",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Provides access to the protocol that the channel uses. <p><b>Note:</b> Subclasses of Channel must override this method and return a string that represents their supported protocol. Examples of supported protocol strings are &quot;rtmp&quot;, &quot;http&quot; or &quot;https&quot;. </p>"},
{ "type": "accessor",
"access": "read-only",
"return": "Boolean",
"qname": "realtime",
"namespace": "mx_internal",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Returns true if the channel supports realtime behavior via server push or client poll.",
"tags": [
{ "tagName": "private",
"values": []} ]},
{ "type": "accessor",
"access": "read-write",
"return": "int",
"qname": "requestTimeout",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Provides access to the default request timeout in seconds for the channel. A value of 0 or below indicates that outbound requests will never be timed out on the client. <p>Request timeouts are most useful for RPC style messaging that requires a response from the remote destination.</p>"},
{ "type": "accessor",
"access": "read-only",
"return": "Boolean",
"qname": "shouldBeConnected",
"namespace": "protected",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Indicates whether this channel should be connected to its endpoint. This flag is used to control when fail over should be attempted and when disconnect notification is sent to the remote endpoint upon disconnect or fault."},
{ "type": "accessor",
"access": "read-write",
"return": "String",
"qname": "uri",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Provides access to the URI used to create the whole endpoint URI for this channel. The URI can be a partial path, in which case the full endpoint URI is computed as necessary."},
{ "type": "accessor",
"access": "read-write",
"return": "String",
"qname": "url",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "",
"tags": [
{ "tagName": "private",
"values": []} ]},
{ "type": "accessor",
"access": "read-write",
"return": "Boolean",
"qname": "useSmallMessages",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "",
"tags": [
{ "tagName": "private",
"values": []} ]},
{ "type": "method",
"qname": "applySettings",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Subclasses should override this method to apply any settings that may be necessary for an individual channel. Make sure to call <code>super.applySettings()</code> to apply common settings for the channel. * * This method is used primarily in Channel subclasses.",
"tags": [
{ "tagName": "param",
"values": ["settings XML fragment of the services-config.xml file for this channel."]} ],
"return": "void",
"params": [{ "name": "settings", "type": "XML"}]}
,
{ "type": "method",
"qname": "applyClientLoadBalancingSettings",
"namespace": "protected",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Applies the client load balancing urls if they exists. It randomly picks a url from the set of client load balancing urls and sets it as the channel's main url; then it assigns the rest of the urls as the <code>failoverURIs</code> of the channel. file for this channel.",
"tags": [
{ "tagName": "param",
"values": ["props The properties section of the XML fragment of the services-config.xml"]} ],
"return": "void",
"params": [{ "name": "props", "type": "XML"}]}
,
{ "type": "method",
"qname": "connect",
"namespace": "public",
"bindable": [],
"details": ["final"],
"deprecated": {},
"description": "Connects the ChannelSet to the Channel. If the Channel has not yet connected to its endpoint, it attempts to do so. Channel subclasses must override the <code>internalConnect()</code> method, and call the <code>connectSuccess()</code> method once the underlying connection is established.",
"tags": [
{ "tagName": "param",
"values": ["channelSet The ChannelSet to connect to the Channel."]} ],
"return": "void",
"params": [{ "name": "channelSet", "type": "mx.messaging.ChannelSet"}]}
,
{ "type": "method",
"qname": "disconnect",
"namespace": "public",
"bindable": [],
"details": ["final"],
"deprecated": {},
"description": "Disconnects the ChannelSet from the Channel. If the Channel is connected to its endpoint and it has no more connected ChannelSets it will internally disconnect. <p>Channel subclasses need to override the <code>internalDisconnect()</code> method, and call the <code>disconnectSuccess()</code> method when the underlying connection has been terminated.</p>",
"tags": [
{ "tagName": "param",
"values": ["channelSet The ChannelSet to disconnect from the Channel."]} ],
"return": "void",
"params": [{ "name": "channelSet", "type": "mx.messaging.ChannelSet"}]}
,
{ "type": "method",
"qname": "logout",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Sends a CommandMessage to the server to logout if the Channel is connected. Current credentials are cleared.",
"tags": [
{ "tagName": "param",
"values": ["agent The MessageAgent to logout."]} ],
"return": "void",
"params": [{ "name": "agent", "type": "mx.messaging.MessageAgent"}]}
,
{ "type": "method",
"qname": "send",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Sends the specified message to its target destination. Subclasses must override the <code>internalSend()</code> method to perform the actual send. message specify a destination.",
"tags": [
{ "tagName": "param",
"values": ["agent The MessageAgent that is sending the message.", "message The Message to send."]},
{ "tagName": "throws",
"values": ["mx.messaging.errors.InvalidDestinationError If neither the MessageAgent nor the"]} ],
"return": "void",
"params": [{ "name": "agent", "type": "mx.messaging.MessageAgent"},
{ "name": "message", "type": "mx.messaging.messages.IMessage"}]}
,
{ "type": "method",
"qname": "setCredentials",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Sets the credentials to the specified value. If the credentials are non-null and the Channel is connected, this method also sends a CommandMessage to the server to login using the credentials. credentials. The default is null, which implies the legacy charset of ISO-Latin-1. have already been set and an authentication is in progress with the remote detination, or if authenticated and the credentials specified don't match the currently authenticated credentials.",
"tags": [
{ "tagName": "param",
"values": ["credentials The credentials string.", "agent The MessageAgent to login, that will handle the login result.", "charset The character set encoding used while encoding the"]},
{ "tagName": "throws",
"values": ["flash.errors.IllegalOperationError in two situations; if credentials"]} ],
"return": "void",
"params": [{ "name": "credentials", "type": "String"},
{ "name": "agent", "type": "mx.messaging.MessageAgent"},
{ "name": "charset", "type": "String"}]}
,
{ "type": "accessor",
"access": "read-only",
"return": "Boolean",
"qname": "mpiEnabled",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Should we record any performance metrics",
"tags": [
{ "tagName": "private",
"values": [""]} ]},
{ "type": "method",
"qname": "connectFailed",
"namespace": "protected",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Processes a failed internal connect and dispatches the <code>FAULT</code> event for the channel. If the Channel has <code>failoverURI</code> values, it will attempt to reconnect automatically by trying these URI values in order until a connection is established or the available values are exhausted.",
"tags": [
{ "tagName": "param",
"values": ["event The ChannelFaultEvent for the failed connect."]} ],
"return": "void",
"params": [{ "name": "event", "type": "mx.messaging.events.ChannelFaultEvent"}]}
,
{ "type": "method",
"qname": "connectSuccess",
"namespace": "protected",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Processes a successful internal connect and dispatches the <code>CONNECT</code> event for the Channel.",
"return": "void",
"params": []}
,
{ "type": "method",
"qname": "connectTimeoutHandler",
"namespace": "protected",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Handles a connect timeout by dispatching a ChannelFaultEvent. Subtypes may overide this to shutdown the current connect attempt but must call <code>super.connectTimeoutHandler(event)</code>.",
"tags": [
{ "tagName": "param",
"values": ["event The timer event indicating that the connect timeout has been reached."]} ],
"return": "void",
"params": [{ "name": "event", "type": "org.apache.royale.events.Event"}]}
,
{ "type": "method",
"qname": "disconnectSuccess",
"namespace": "protected",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Processes a successful internal disconnect and dispatches the <code>DISCONNECT</code> event for the Channel. If the disconnect is due to a network failure and the Channel has <code>failoverURI</code> values, it will attempt to reconnect automatically by trying these URI values in order until a connection is established or the available values are exhausted. failover processing that would otherwise be attempted; false if failover processing should be allowed to run.",
"tags": [
{ "tagName": "param",
"values": ["rejected True if the disconnect should skip any"]} ],
"return": "void",
"params": [{ "name": "rejected", "type": "Boolean"}]}
,
{ "type": "method",
"qname": "disconnectFailed",
"namespace": "protected",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Processes a failed internal disconnect and dispatches the <code>FAULT</code> event for the channel.",
"tags": [
{ "tagName": "param",
"values": ["event The ChannelFaultEvent for the failed disconnect."]} ],
"return": "void",
"params": [{ "name": "event", "type": "mx.messaging.events.ChannelFaultEvent"}]}
,
{ "type": "method",
"qname": "royaleClientWaitHandler",
"namespace": "protected",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Handles a change to the guard condition for managing initial Channel connect for the application. When this is invoked it means that this Channel is waiting to attempt to connect.",
"tags": [
{ "tagName": "param",
"values": ["event The PropertyChangeEvent dispatched by the RoyaleClient singleton."]} ],
"return": "void",
"params": [{ "name": "event", "type": "mx.events.PropertyChangeEvent"}]}
,
{ "type": "method",
"qname": "getMessageResponder",
"namespace": "protected",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Returns the appropriate MessageResponder for the Channel's <code>send()</code> method. Must be overridden. this method.",
"tags": [
{ "tagName": "param",
"values": ["agent The MessageAgent sending the message.", "message The Message to send."]},
{ "tagName": "throws",
"values": ["flash.errors.IllegalOperationError If the Channel subclass does not override"]},
{ "tagName": "return",
"values": ["The MessageResponder to handle the result or fault."]} ],
"return": "mx.messaging.MessageResponder",
"params": [{ "name": "agent", "type": "mx.messaging.MessageAgent"},
{ "name": "message", "type": "mx.messaging.messages.IMessage"}]}
,
{ "type": "method",
"qname": "internalConnect",
"namespace": "protected",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Connects the Channel to its endpoint. Must be overridden.",
"return": "void",
"params": []}
,
{ "type": "method",
"qname": "internalDisconnect",
"namespace": "protected",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Disconnects the Channel from its endpoint. Must be overridden. and reconnection should not be attempted automatically; otherwise false.",
"tags": [
{ "tagName": "param",
"values": ["rejected True if the disconnect was due to a connection rejection or timeout"]} ],
"return": "void",
"params": [{ "name": "rejected", "type": "Boolean"}]}
,
{ "type": "method",
"qname": "internalSend",
"namespace": "protected",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Sends the Message out over the Channel and routes the response to the responder. Must be overridden.",
"tags": [
{ "tagName": "param",
"values": ["messageResponder The MessageResponder to handle the response."]} ],
"return": "void",
"params": [{ "name": "messageResponder", "type": "mx.messaging.MessageResponder"}]}
]
,
"events": [
{ "qname": "channelConnect",
"type": "mx.messaging.events.ChannelEvent"
,
"description": "Dispatched after the channel has connected to its endpoint. <p>Channel and its subclasses issue a Channel.Connect.Failed code whenever there is an issue in a channel's connect attempts to a remote destination. An AMFChannel object issues Channel.Call.Failed code when the channel is already connected but it gets a Call.Failed code from its underlying NetConnection.</p>",
"tags": [
{ "tagName": "eventType",
"values": ["mx.messaging.events.ChannelEvent.CONNECT"]} ]},
{ "qname": "channelDisconnect",
"type": "mx.messaging.events.ChannelEvent"
,
"description": "Dispatched after the channel has disconnected from its endpoint.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "eventType",
"values": ["mx.messaging.events.ChannelEvent.DISCONNECT"]},
{ "tagName": "productversion",
"values": ["BlazeDS 4", "LCDS 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "qname": "channelFault",
"type": "mx.messaging.events.ChannelFaultEvent"
,
"description": "Dispatched after the channel has faulted.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "eventType",
"values": ["mx.messaging.events.ChannelFaultEvent.FAULT"]},
{ "tagName": "productversion",
"values": ["BlazeDS 4", "LCDS 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "qname": "message",
"type": "mx.messaging.events.MessageEvent"
,
"description": "Dispatched when a channel receives a message from its endpoint.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "eventType",
"values": ["mx.messaging.events.MessageEvent.MESSAGE"]},
{ "tagName": "productversion",
"values": ["BlazeDS 4", "LCDS 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "qname": "propertyChange",
"type": "mx.events.PropertyChangeEvent"
,
"description": "Dispatched when a property of the channel changes.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "eventType",
"values": ["mx.events.PropertyChangeEvent.PROPERTY_CHANGE"]},
{ "tagName": "productversion",
"values": ["BlazeDS 4", "LCDS 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]}]
}