You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by gr...@apache.org on 2019/03/01 07:28:41 UTC
[royale-asjs] 05/05: More import splits for IExernalizable.
Unavoidable for now...
This is an automated email from the ASF dual-hosted git repository.
gregdove pushed a commit to branch amf_updates
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
commit 8dc7553040aa79d6db69e3843b8f2202d0b27ad2
Author: greg-dove <gr...@gmail.com>
AuthorDate: Fri Mar 1 20:01:19 2019 +1300
More import splits for IExernalizable. Unavoidable for now...
---
.../net/remoting/messages/AbstractMessage.as | 160 +++++++++--------
.../net/remoting/messages/AcknowledgeMessage.as | 34 ++--
.../net/remoting/messages/AcknowledgeMessageExt.as | 13 +-
.../royale/net/remoting/messages/AsyncMessage.as | 47 ++---
.../net/remoting/messages/AsyncMessageExt.as | 18 +-
.../royale/net/remoting/messages/CommandMessage.as | 197 +++++++++++----------
.../net/remoting/messages/CommandMessageExt.as | 16 +-
7 files changed, 266 insertions(+), 219 deletions(-)
diff --git a/frameworks/projects/Network/src/main/royale/org/apache/royale/net/remoting/messages/AbstractMessage.as b/frameworks/projects/Network/src/main/royale/org/apache/royale/net/remoting/messages/AbstractMessage.as
index 558303a..3c88ee2 100644
--- a/frameworks/projects/Network/src/main/royale/org/apache/royale/net/remoting/messages/AbstractMessage.as
+++ b/frameworks/projects/Network/src/main/royale/org/apache/royale/net/remoting/messages/AbstractMessage.as
@@ -20,10 +20,18 @@
package org.apache.royale.net.remoting.messages
{
import org.apache.royale.utils.ObjectUtil;
- import org.apache.royale.net.utils.IDataInput;
- import org.apache.royale.net.utils.IDataOutput;
+ COMPILE::SWF{
+ import flash.utils.IDataInput;
+ import flash.utils.IDataOutput;
+ }
+
+ COMPILE::JS{
+ import org.apache.royale.net.utils.IDataInput;
+ import org.apache.royale.net.utils.IDataOutput;
+ }
import org.apache.royale.utils.BinaryData;
import org.apache.royale.utils.UIDUtil;
+
/*
import mx.utils.RPCObjectUtil;
@@ -42,125 +50,125 @@ package org.apache.royale.net.remoting.messages
* delivered and processed by the remote destination.
* The <code>body</code> is an object and is the payload for a message.
* </p>
- *
+ *
* Note: readExternal and writeExternal methods compile but are not tested and maybe not work
* but is an initial work
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public class AbstractMessage implements IMessage
{
//--------------------------------------------------------------------------
//
// Static Constants
- //
+ //
//--------------------------------------------------------------------------
/**
* Messages pushed from the server may arrive in a batch, with messages in the
- * batch potentially targeted to different Consumer instances.
- * Each message will contain this header identifying the Consumer instance that
+ * batch potentially targeted to different Consumer instances.
+ * Each message will contain this header identifying the Consumer instance that
* will receive the message.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public static const DESTINATION_CLIENT_ID_HEADER:String = "DSDstClientId";
/**
* Messages are tagged with the endpoint id for the Channel they are sent over.
* Channels set this value automatically when they send a message.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public static const ENDPOINT_HEADER:String = "DSEndpoint";
/**
* This header is used to transport the global RoyaleClient Id value in outbound
* messages once it has been assigned by the server.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public static const ROYALE_CLIENT_ID_HEADER:String = "DSId";
/**
* Messages sent by a MessageAgent can have a priority header with a 0-9
* numerical value (0 being lowest) and the server can choose to use this
- * numerical value to prioritize messages to clients.
- *
+ * numerical value to prioritize messages to clients.
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public static const PRIORITY_HEADER:String = "DSPriority";
/**
* Messages that need to set remote credentials for a destination
- * carry the Base64 encoded credentials in this header.
- *
+ * carry the Base64 encoded credentials in this header.
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public static const REMOTE_CREDENTIALS_HEADER:String = "DSRemoteCredentials";
/**
* Messages that need to set remote credentials for a destination
* may also need to report the character-set encoding that was used to
- * create the credentials String using this header.
- *
+ * create the credentials String using this header.
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public static const REMOTE_CREDENTIALS_CHARSET_HEADER:String = "DSRemoteCredentialsCharset";
-
+
/**
- * Messages sent with a defined request timeout use this header.
- * The request timeout value is set on outbound messages by services or
- * channels and the value controls how long the corresponding MessageResponder
+ * Messages sent with a defined request timeout use this header.
+ * The request timeout value is set on outbound messages by services or
+ * channels and the value controls how long the corresponding MessageResponder
* will wait for an acknowledgement, result or fault response for the message
* before timing out the request.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
- public static const REQUEST_TIMEOUT_HEADER:String = "DSRequestTimeout";
+ public static const REQUEST_TIMEOUT_HEADER:String = "DSRequestTimeout";
/**
* A status code can provide context about the nature of a response
* message. For example, messages received from an HTTP based channel may
* need to report the HTTP response status code (if available).
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public static const STATUS_CODE_HEADER:String = "DSStatusCode";
@@ -168,7 +176,7 @@ package org.apache.royale.net.remoting.messages
//--------------------------------------------------------------------------
//
// Private Static Constants for Serialization
- //
+ //
//--------------------------------------------------------------------------
private static const HAS_NEXT_FLAG:uint = 128;
@@ -185,18 +193,18 @@ package org.apache.royale.net.remoting.messages
//--------------------------------------------------------------------------
//
// Constructor
- //
+ //
//--------------------------------------------------------------------------
/**
* Constructs an instance of an AbstractMessage with an empty body and header.
* This message type should not be instantiated or used directly.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public function AbstractMessage()
{
@@ -206,7 +214,7 @@ package org.apache.royale.net.remoting.messages
//--------------------------------------------------------------------------
//
// Properties
- //
+ //
//--------------------------------------------------------------------------
//----------------------------------
@@ -219,14 +227,14 @@ package org.apache.royale.net.remoting.messages
private var _body:Object = {};
/**
- * The body of a message contains the specific data that needs to be
+ * The body of a message contains the specific data that needs to be
* delivered to the remote destination.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public function get body():Object
{
@@ -239,7 +247,7 @@ package org.apache.royale.net.remoting.messages
public function set body(value:Object):void
{
_body = value;
- }
+ }
//----------------------------------
// clientId
@@ -257,16 +265,16 @@ package org.apache.royale.net.remoting.messages
/**
* The clientId indicates which MessageAgent sent the message.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public function get clientId():String
{
- return _clientId;
+ return _clientId;
}
/**
@@ -289,24 +297,24 @@ package org.apache.royale.net.remoting.messages
/**
* The message destination.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
- */
+ * @productversion LCDS 3
+ */
public function get destination():String
{
- return _destination;
+ return _destination;
}
/**
* @private
- */
+ */
public function set destination(value:String):void
{
- _destination = value;
+ _destination = value;
}
//----------------------------------
@@ -321,23 +329,23 @@ package org.apache.royale.net.remoting.messages
/**
* The headers of a message are an associative array where the key is the
* header name and the value is the header value.
- * This property provides access to the specialized meta information for the
+ * This property provides access to the specialized meta information for the
* specific message instance.
- * Core header names begin with a 'DS' prefix. Custom header names should start
+ * Core header names begin with a 'DS' prefix. Custom header names should start
* with a unique prefix to avoid name collisions.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public function get headers():Object
{
if (_headers == null)
_headers = {};
- return _headers;
+ return _headers;
}
/**
@@ -345,7 +353,7 @@ package org.apache.royale.net.remoting.messages
*/
public function set headers(value:Object):void
{
- _headers = value;
+ _headers = value;
}
//----------------------------------
@@ -364,12 +372,12 @@ package org.apache.royale.net.remoting.messages
/**
* The unique id for the message.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public function get messageId():String
{
@@ -405,12 +413,12 @@ package org.apache.royale.net.remoting.messages
* message expiration.
*
* @see #timeToLive
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public function get timestamp():Number
{
@@ -423,7 +431,7 @@ package org.apache.royale.net.remoting.messages
public function set timestamp(value:Number):void
{
_timestamp = value;
- }
+ }
//----------------------------------
// timeToLive
@@ -444,12 +452,12 @@ package org.apache.royale.net.remoting.messages
* and the <code>timeToLive</code> value is 5000, then this message will
* expire at 04/05/05 1:30:50 PST.
* Once a message expires it will not be delivered to any other clients.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public function get timeToLive():Number
{
@@ -458,21 +466,21 @@ package org.apache.royale.net.remoting.messages
/**
* @private
- */
+ */
public function set timeToLive(value:Number):void
{
- _timeToLive = value;
- }
+ _timeToLive = value;
+ }
//--------------------------------------------------------------------------
//
// Methods
- //
+ //
//--------------------------------------------------------------------------
/**
* @private
- *
+ *
* While this class itself does not implement flash.utils.IExternalizable,
* ISmallMessage implementations will typically use IExternalizable to
* serialize themselves in a smaller form. This method supports this
@@ -552,12 +560,12 @@ package org.apache.royale.net.remoting.messages
* Returns a string representation of the message.
*
* @return String representation of the message.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public function toString():String
{
@@ -566,7 +574,7 @@ package org.apache.royale.net.remoting.messages
/**
* @private
- *
+ *
* While this class itself does not implement flash.utils.IExternalizable,
* ISmallMessage implementations will typically use IExternalizable to
* serialize themselves in a smaller form. This method supports this
@@ -656,12 +664,12 @@ package org.apache.royale.net.remoting.messages
//--------------------------------------------------------------------------
//
// Protected Methods
- //
- //--------------------------------------------------------------------------
+ //
+ //--------------------------------------------------------------------------
/**
* @private
- */
+ */
/*
protected function addDebugAttributes(attributes:Object):void
{
@@ -677,7 +685,7 @@ package org.apache.royale.net.remoting.messages
/**
* @private
- */
+ */
/*
final protected function getDebugString():String
{
@@ -720,7 +728,7 @@ package org.apache.royale.net.remoting.messages
* stream. Flags are read in one byte at a time. Flags make use of
* sign-extension so that if the high-bit is set to 1 this indicates that
* another set of flags follows.
- *
+ *
* @return The Array of property flags. Each flags byte is stored as a uint
* in the Array.
*/
diff --git a/frameworks/projects/Network/src/main/royale/org/apache/royale/net/remoting/messages/AcknowledgeMessage.as b/frameworks/projects/Network/src/main/royale/org/apache/royale/net/remoting/messages/AcknowledgeMessage.as
index 17b02c5..ddc7367 100644
--- a/frameworks/projects/Network/src/main/royale/org/apache/royale/net/remoting/messages/AcknowledgeMessage.as
+++ b/frameworks/projects/Network/src/main/royale/org/apache/royale/net/remoting/messages/AcknowledgeMessage.as
@@ -18,57 +18,65 @@
////////////////////////////////////////////////////////////////////////////////
package org.apache.royale.net.remoting.messages
{
- import org.apache.royale.net.utils.IDataInput;
- import org.apache.royale.net.utils.IDataOutput;
+
+ COMPILE::SWF{
+ import flash.utils.IDataInput;
+ import flash.utils.IDataOutput;
+ }
+
+ COMPILE::JS{
+ import org.apache.royale.net.utils.IDataInput;
+ import org.apache.royale.net.utils.IDataOutput;
+ }
[RemoteClass(alias="flex.messaging.messages.AcknowledgeMessage")]
/**
- * An AcknowledgeMessage acknowledges the receipt of a message that
+ * An AcknowledgeMessage acknowledges the receipt of a message that
* was sent previously.
* Every message sent within the messaging system must receive an
* acknowledgement.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public class AcknowledgeMessage extends AsyncMessage implements ISmallMessage
{
//--------------------------------------------------------------------------
//
// Static Constants
- //
+ //
//--------------------------------------------------------------------------
/**
* Header name for the error hint header.
* Used to indicate that the acknowledgement is for a message that
* generated an error.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public static const ERROR_HINT_HEADER:String = "DSErrorHint";
//--------------------------------------------------------------------------
//
// Constructor
- //
+ //
//--------------------------------------------------------------------------
/**
* Constructs an instance of an AcknowledgeMessage with an empty body and header.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public function AcknowledgeMessage()
{
@@ -78,7 +86,7 @@ package org.apache.royale.net.remoting.messages
//--------------------------------------------------------------------------
//
// Overridden Methods
- //
+ //
//--------------------------------------------------------------------------
/**
@@ -130,6 +138,6 @@ package org.apache.royale.net.remoting.messages
trace("AcknowledgeMessage.writeExternal");
var flags:uint = 0;
output.writeByte(flags);
- }
+ }
}
}
diff --git a/frameworks/projects/Network/src/main/royale/org/apache/royale/net/remoting/messages/AcknowledgeMessageExt.as b/frameworks/projects/Network/src/main/royale/org/apache/royale/net/remoting/messages/AcknowledgeMessageExt.as
index 3704c48..dbad4bb 100644
--- a/frameworks/projects/Network/src/main/royale/org/apache/royale/net/remoting/messages/AcknowledgeMessageExt.as
+++ b/frameworks/projects/Network/src/main/royale/org/apache/royale/net/remoting/messages/AcknowledgeMessageExt.as
@@ -18,8 +18,13 @@
////////////////////////////////////////////////////////////////////////////////
package org.apache.royale.net.remoting.messages
{
- import org.apache.royale.net.utils.IDataOutput;
import org.apache.royale.net.utils.IExternalizable;
+ COMPILE::JS{
+ import org.apache.royale.net.utils.IDataOutput;
+ }
+ COMPILE::SWF{
+ import flash.utils.IDataOutput;
+ }
[RemoteClass(alias="DSK")]
/**
@@ -30,7 +35,7 @@ package org.apache.royale.net.remoting.messages
//--------------------------------------------------------------------------
//
// Constructor
- //
+ //
//--------------------------------------------------------------------------
public function AcknowledgeMessageExt(message:AcknowledgeMessage = null)
@@ -49,12 +54,12 @@ package org.apache.royale.net.remoting.messages
/**
* The unique id for the message.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
override public function get messageId():String
{
diff --git a/frameworks/projects/Network/src/main/royale/org/apache/royale/net/remoting/messages/AsyncMessage.as b/frameworks/projects/Network/src/main/royale/org/apache/royale/net/remoting/messages/AsyncMessage.as
index b2a3646..01be6f7 100644
--- a/frameworks/projects/Network/src/main/royale/org/apache/royale/net/remoting/messages/AsyncMessage.as
+++ b/frameworks/projects/Network/src/main/royale/org/apache/royale/net/remoting/messages/AsyncMessage.as
@@ -19,9 +19,16 @@
package org.apache.royale.net.remoting.messages
{
-
-import org.apache.royale.net.utils.IDataInput;
-import org.apache.royale.net.utils.IDataOutput;
+
+ COMPILE::SWF{
+ import flash.utils.IDataInput;
+ import flash.utils.IDataOutput;
+ }
+
+ COMPILE::JS{
+ import org.apache.royale.net.utils.IDataInput;
+ import org.apache.royale.net.utils.IDataOutput;
+ }
import org.apache.royale.utils.BinaryData;
import org.apache.royale.utils.UIDUtil;
@@ -31,37 +38,37 @@ import org.apache.royale.utils.UIDUtil;
* AsyncMessage is the base class for all asynchronous messages.
* Note: readExternal and writeExternal methods compile but are not tested and maybe not work
* but is an initial work
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public class AsyncMessage extends AbstractMessage implements ISmallMessage
{
//--------------------------------------------------------------------------
//
// Static Constants
- //
+ //
//--------------------------------------------------------------------------
/**
* Messages sent by a MessageAgent with a defined <code>subtopic</code>
* property indicate their target subtopic in this header.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
- public static const SUBTOPIC_HEADER:String = "DSSubtopic";
+ public static const SUBTOPIC_HEADER:String = "DSSubtopic";
//--------------------------------------------------------------------------
//
// Private Static Constants for Serialization
- //
+ //
//--------------------------------------------------------------------------
private static const CORRELATION_ID_FLAG:uint = 1;
@@ -70,7 +77,7 @@ public class AsyncMessage extends AbstractMessage implements ISmallMessage
//--------------------------------------------------------------------------
//
// Constructor
- //
+ //
//--------------------------------------------------------------------------
/**
@@ -81,16 +88,16 @@ public class AsyncMessage extends AbstractMessage implements ISmallMessage
* <code>var msg:AsyncMessage = new AsyncMessage("Body text");</code>
* An example that provides both the body and headers is:
* <code>var msg:AsyncMessage = new AsyncMessage("Body text", {"customerHeader":"customValue"});</code>
- *
+ *
* @param body The optional body to assign to the message.
- *
+ *
* @param headers The optional headers to assign to the message.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public function AsyncMessage(body:Object = null, headers:Object = null)
{
@@ -100,14 +107,14 @@ public class AsyncMessage extends AbstractMessage implements ISmallMessage
if (body != null)
this.body = body;
- if (headers != null)
+ if (headers != null)
this.headers = headers;
}
//--------------------------------------------------------------------------
//
// Variables
- //
+ //
//--------------------------------------------------------------------------
//----------------------------------
@@ -131,12 +138,12 @@ public class AsyncMessage extends AbstractMessage implements ISmallMessage
* previous message that this message refers to.
*
* @see mx.messaging.messages.AbstractMessage#messageId
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public function get correlationId():String
{
@@ -155,7 +162,7 @@ public class AsyncMessage extends AbstractMessage implements ISmallMessage
//--------------------------------------------------------------------------
//
// Overridden Methods
- //
+ //
//--------------------------------------------------------------------------
/**
diff --git a/frameworks/projects/Network/src/main/royale/org/apache/royale/net/remoting/messages/AsyncMessageExt.as b/frameworks/projects/Network/src/main/royale/org/apache/royale/net/remoting/messages/AsyncMessageExt.as
index 57f5f47..f82f2e3 100644
--- a/frameworks/projects/Network/src/main/royale/org/apache/royale/net/remoting/messages/AsyncMessageExt.as
+++ b/frameworks/projects/Network/src/main/royale/org/apache/royale/net/remoting/messages/AsyncMessageExt.as
@@ -16,10 +16,16 @@
// limitations under the License.
//
////////////////////////////////////////////////////////////////////////////////
-package org.apache.royale.net.remoting.messages
+package org.apache.royale.net.remoting.messages
{
- import org.apache.royale.net.utils.IDataOutput;
+
import org.apache.royale.net.utils.IExternalizable;
+ COMPILE::JS{
+ import org.apache.royale.net.utils.IDataOutput;
+ }
+ COMPILE::SWF{
+ import flash.utils.IDataOutput;
+ }
[RemoteClass(alias="DSA")]
/**
@@ -27,7 +33,7 @@ package org.apache.royale.net.remoting.messages
* enable the externalizable form of an AsyncMessage for serialization. The
* wrapper must be applied just before the message is serialized as it does not
* proxy any information to the wrapped message.
- *
+ *
* @private
*/
public class AsyncMessageExt extends AsyncMessage implements IExternalizable
@@ -35,7 +41,7 @@ package org.apache.royale.net.remoting.messages
//--------------------------------------------------------------------------
//
// Constructor
- //
+ //
//--------------------------------------------------------------------------
public function AsyncMessageExt(message:AsyncMessage=null)
@@ -54,12 +60,12 @@ package org.apache.royale.net.remoting.messages
/**
* The unique id for the message.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
override public function get messageId():String
{
diff --git a/frameworks/projects/Network/src/main/royale/org/apache/royale/net/remoting/messages/CommandMessage.as b/frameworks/projects/Network/src/main/royale/org/apache/royale/net/remoting/messages/CommandMessage.as
index 7eb7570..7365804 100644
--- a/frameworks/projects/Network/src/main/royale/org/apache/royale/net/remoting/messages/CommandMessage.as
+++ b/frameworks/projects/Network/src/main/royale/org/apache/royale/net/remoting/messages/CommandMessage.as
@@ -19,22 +19,29 @@
package org.apache.royale.net.remoting.messages
{
- import org.apache.royale.net.utils.IDataInput;
- import org.apache.royale.net.utils.IDataOutput;
+ COMPILE::SWF{
+ import flash.utils.IDataInput;
+ import flash.utils.IDataOutput;
+ }
+
+ COMPILE::JS{
+ import org.apache.royale.net.utils.IDataInput;
+ import org.apache.royale.net.utils.IDataOutput;
+ }
[RemoteClass(alias="flex.messaging.messages.CommandMessage")]
/**
* The CommandMessage class provides a mechanism for sending commands to the
- * server infrastructure, such as commands related to publish/subscribe
+ * server infrastructure, such as commands related to publish/subscribe
* messaging scenarios, ping operations, and cluster operations.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
- *
+ * @productversion LCDS 3
+ *
* @royalesuppresspublicvarwarning
*/
public class CommandMessage extends AsyncMessage
@@ -42,102 +49,102 @@ package org.apache.royale.net.remoting.messages
//--------------------------------------------------------------------------
//
// Static Constants
- //
+ //
//--------------------------------------------------------------------------
/**
* This operation is used to subscribe to a remote destination.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public static const SUBSCRIBE_OPERATION:uint = 0;
/**
* This operation is used to unsubscribe from a remote destination.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public static const UNSUBSCRIBE_OPERATION:uint = 1;
/**
* This operation is used to poll a remote destination for pending,
* undelivered messages.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public static const POLL_OPERATION:uint = 2;
/**
- * This operation is used by a remote destination to sync missed or cached messages
+ * This operation is used by a remote destination to sync missed or cached messages
* back to a client as a result of a client issued poll command.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public static const CLIENT_SYNC_OPERATION:uint = 4;
/**
* This operation is used to test connectivity over the current channel to
* the remote endpoint.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public static const CLIENT_PING_OPERATION:uint = 5;
/**
* This operation is used to request a list of failover endpoint URIs
* for the remote destination based on cluster membership.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public static const CLUSTER_REQUEST_OPERATION:uint = 7;
/**
* This operation is used to send credentials to the endpoint so that
- * the user can be logged in over the current channel.
+ * the user can be logged in over the current channel.
* The credentials need to be Base64 encoded and stored in the <code>body</code>
* of the message.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public static const LOGIN_OPERATION:uint = 8;
/**
- * This operation is used to log the user out of the current channel, and
+ * This operation is used to log the user out of the current channel, and
* will invalidate the server session if the channel is HTTP based.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public static const LOGOUT_OPERATION:uint = 9;
@@ -145,201 +152,201 @@ package org.apache.royale.net.remoting.messages
* Endpoints can imply what features they support by reporting the
* latest version of messaging they are capable of during the handshake of
* the initial ping CommandMessage.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public static const MESSAGING_VERSION:String = "DSMessagingVersion";
/**
* This operation is used to indicate that the client's subscription with a
* remote destination has timed out.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public static const SUBSCRIPTION_INVALIDATE_OPERATION:uint = 10;
/**
* Used by the MultiTopicConsumer to subscribe/unsubscribe for more
* than one topic in the same message.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public static const MULTI_SUBSCRIBE_OPERATION:uint = 11;
/**
* This operation is used to indicate that a channel has disconnected.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public static const DISCONNECT_OPERATION:uint = 12;
-
+
/**
* This operation is used to trigger a ChannelSet to connect.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
- public static const TRIGGER_CONNECT_OPERATION:uint = 13;
+ public static const TRIGGER_CONNECT_OPERATION:uint = 13;
/**
* This is the default operation for new CommandMessage instances.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public static const UNKNOWN_OPERATION:uint = 10000;
/**
* The server message type for authentication commands.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public static const AUTHENTICATION_MESSAGE_REF_TYPE:String = "flex.messaging.messages.AuthenticationMessage";
/**
* Subscribe commands issued by a Consumer pass the Consumer's <code>selector</code>
* expression in this header.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public static const SELECTOR_HEADER:String = "DSSelector";
/**
* Durable JMS subscriptions are preserved when an unsubscribe message
* has this parameter set to true in its header.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
- public static const PRESERVE_DURABLE_HEADER:String = "DSPreserveDurable";
+ public static const PRESERVE_DURABLE_HEADER:String = "DSPreserveDurable";
/**
* Header to indicate that the Channel needs the configuration from the
* server.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public static const NEEDS_CONFIG_HEADER:String = "DSNeedsConfig";
- /**
+ /**
* Header used in a MULTI_SUBSCRIBE message to specify an Array of subtopic/selector
* pairs to add to the existing set of subscriptions.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public static const ADD_SUBSCRIPTIONS:String = "DSAddSub";
/**
* Like the above, but specifies the subtopic/selector array of to remove
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public static const REMOVE_SUBSCRIPTIONS:String = "DSRemSub";
/**
- * The separator string used for separating subtopic and selectors in the
+ * The separator string used for separating subtopic and selectors in the
* add and remove subscription headers.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public static const SUBTOPIC_SEPARATOR:String = "_;_";
/**
* Header to drive an idle wait time before the next client poll request.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
- public static const POLL_WAIT_HEADER:String = "DSPollWait";
+ public static const POLL_WAIT_HEADER:String = "DSPollWait";
/**
- * Header to suppress poll response processing. If a client has a long-poll
- * parked on the server and issues another poll, the response to this subsequent poll
+ * Header to suppress poll response processing. If a client has a long-poll
+ * parked on the server and issues another poll, the response to this subsequent poll
* should be tagged with this header in which case the response is treated as a
- * no-op and the next poll will not be scheduled. Without this, a subsequent poll
+ * no-op and the next poll will not be scheduled. Without this, a subsequent poll
* will put the channel and endpoint into a busy polling cycle.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public static const NO_OP_POLL_HEADER:String = "DSNoOpPoll";
/**
* Header to specify which character set encoding was used while encoding
- * login credentials.
- *
+ * login credentials.
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
- public static const CREDENTIALS_CHARSET_HEADER:String = "DSCredentialsCharset";
+ public static const CREDENTIALS_CHARSET_HEADER:String = "DSCredentialsCharset";
/**
- * Header to indicate the maximum number of messages a Consumer wants to
+ * Header to indicate the maximum number of messages a Consumer wants to
* receive per second.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public static const MAX_FREQUENCY_HEADER:String = "DSMaxFrequency";
@@ -351,7 +358,7 @@ package org.apache.royale.net.remoting.messages
//--------------------------------------------------------------------------
//
// Private Static Constants for Serialization
- //
+ //
//--------------------------------------------------------------------------
private static const OPERATION_FLAG:uint = 1;
@@ -359,31 +366,31 @@ package org.apache.royale.net.remoting.messages
//--------------------------------------------------------------------------
//
// Static Variables
- //
+ //
//--------------------------------------------------------------------------
/**
- * @private
+ * @private
* Map of operations to semi-descriptive operation text strings.
*/
- private static var operationTexts:Object = null;
+ private static var operationTexts:Object = null;
//--------------------------------------------------------------------------
//
// Constructor
- //
+ //
//--------------------------------------------------------------------------
/**
* Constructs an instance of a CommandMessage with an empty body and header
* and a default <code>operation</code> of <code>UNKNOWN_OPERATION</code>.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public function CommandMessage()
{
@@ -394,26 +401,26 @@ package org.apache.royale.net.remoting.messages
//--------------------------------------------------------------------------
//
// Variables
- //
- //--------------------------------------------------------------------------
+ //
+ //--------------------------------------------------------------------------
/**
* Provides access to the operation/command for the CommandMessage.
* Operations indicate how this message should be processed by the remote
* destination.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
public var operation:uint;
//--------------------------------------------------------------------------
//
// Overridden Methods
- //
+ //
//--------------------------------------------------------------------------
/**
@@ -434,7 +441,7 @@ package org.apache.royale.net.remoting.messages
/**
* @private
- */
+ */
/*
override protected function addDebugAttributes(attributes:Object):void
{
@@ -447,12 +454,12 @@ package org.apache.royale.net.remoting.messages
* Returns a string representation of the message.
*
* @return String representation of the message.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
/*
override public function toString():String
@@ -464,30 +471,30 @@ package org.apache.royale.net.remoting.messages
//--------------------------------------------------------------------------
//
// Methods
- //
+ //
//--------------------------------------------------------------------------
/**
* Provides a description of the operation specified.
- * This method is used in <code>toString()</code> operations on this
+ * This method is used in <code>toString()</code> operations on this
* message.
- *
+ *
* @param op One of the CommandMessage operation constants.
- *
+ *
* @return Short name for the operation.
- *
+ *
* @example
* <code><pre>
* var msg:CommandMessage = CommandMessage(event.message);
* trace("Current operation -'"+
* CommandMessage.getOperationAsString(msg.operation)+ "'.");
* </pre></code>
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
/*
public static function getOperationAsString(op:uint):String
@@ -566,6 +573,6 @@ package org.apache.royale.net.remoting.messages
if (operation != 0)
output.writeObject(operation);
- }
+ }
}
}
diff --git a/frameworks/projects/Network/src/main/royale/org/apache/royale/net/remoting/messages/CommandMessageExt.as b/frameworks/projects/Network/src/main/royale/org/apache/royale/net/remoting/messages/CommandMessageExt.as
index 6f2a157..4f75aee 100644
--- a/frameworks/projects/Network/src/main/royale/org/apache/royale/net/remoting/messages/CommandMessageExt.as
+++ b/frameworks/projects/Network/src/main/royale/org/apache/royale/net/remoting/messages/CommandMessageExt.as
@@ -18,8 +18,14 @@
////////////////////////////////////////////////////////////////////////////////
package org.apache.royale.net.remoting.messages
{
- import org.apache.royale.net.utils.IDataOutput;
+
import org.apache.royale.net.utils.IExternalizable;
+ COMPILE::JS{
+ import org.apache.royale.net.utils.IDataOutput;
+ }
+ COMPILE::SWF{
+ import flash.utils.IDataOutput;
+ }
[RemoteClass(alias="DSC")]
/**
@@ -27,7 +33,7 @@ package org.apache.royale.net.remoting.messages
* enable the externalizable form of an CommandMessage for serialization. The
* wrapper must be applied just before the message is serialized as it does not
* proxy any information to the wrapped message.
- *
+ *
* @private
*/
public class CommandMessageExt extends CommandMessage implements IExternalizable
@@ -35,7 +41,7 @@ package org.apache.royale.net.remoting.messages
//--------------------------------------------------------------------------
//
// Constructor
- //
+ //
//--------------------------------------------------------------------------
public function CommandMessageExt(message:CommandMessage=null)
@@ -54,12 +60,12 @@ package org.apache.royale.net.remoting.messages
/**
* The unique id for the message.
- *
+ *
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion BlazeDS 4
- * @productversion LCDS 3
+ * @productversion LCDS 3
*/
override public function get messageId():String
{