more messages
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/a2afa568 Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/a2afa568 Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/a2afa568 Branch: refs/heads/feature/amf Commit: a2afa5682f6d3b041ab280252244a4ff11c227f0 Parents: a3cd8f2 Author: Alex Harui <[email protected]> Authored: Fri Sep 1 11:09:20 2017 -0700 Committer: Carlos Rovira <[email protected]> Committed: Thu Sep 7 00:24:03 2017 +0200 ---------------------------------------------------------------------- .../flex/net/remoting/messages/ActionMessage.as | 160 +++++++++++++++++++ .../flex/net/remoting/messages/ErrorMessage.as | 76 +++++++++ .../flex/net/remoting/messages/MessageBody.as | 130 +++++++++++++++ .../flex/net/remoting/messages/MessageHeader.as | 131 +++++++++++++++ 4 files changed, 497 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a2afa568/frameworks/projects/Network/src/main/flex/org/apache/flex/net/remoting/messages/ActionMessage.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/Network/src/main/flex/org/apache/flex/net/remoting/messages/ActionMessage.as b/frameworks/projects/Network/src/main/flex/org/apache/flex/net/remoting/messages/ActionMessage.as new file mode 100644 index 0000000..b8a868c --- /dev/null +++ b/frameworks/projects/Network/src/main/flex/org/apache/flex/net/remoting/messages/ActionMessage.as @@ -0,0 +1,160 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +//////////////////////////////////////////////////////////////////////////////// + +/*** + * AMF JavaScript library by Emil Malinov https://github.com/emilkm/amfjs + */ + +package org.apache.flex.net.remoting.messages +{ + +COMPILE::SWF +{ +import flash.utils.IDataInput; +import flash.utils.IDataOutput; +} + +[RemoteClass(alias="flex.messaging.io.amf.ActionMessage")] + +/** + * The CommandMessage class provides a mechanism for sending commands to the + * 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 + */ +public class ActionMessage +{ + //-------------------------------------------------------------------------- + // + // Constructor + // + //-------------------------------------------------------------------------- + + /** + * Constructs an instance of an ActionMessage with an empty array of bodies + * and headers. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion BlazeDS 4 + * @productversion LCDS 3 + */ + public function ActionMessage() + { + super(); + } + + //-------------------------------------------------------------------------- + // + // Variables + // + //-------------------------------------------------------------------------- + + /** + * The version of the ActionMessage. Probably should not be changed. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion BlazeDS 4 + * @productversion LCDS 3 + */ + public var version:int = 3; + + //-------------------------------------------------------------------------- + // + // Overridden Methods + // + //-------------------------------------------------------------------------- + + //-------------------------------------------------------------------------- + // + // Properties + // + //-------------------------------------------------------------------------- + + //---------------------------------- + // bodies + //---------------------------------- + + /** + * @private + */ + private var _bodies:Array = []; + + /** + * The array of MessageBody instances. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion BlazeDS 4 + * @productversion LCDS 3 + */ + public function get bodies():Array + { + return _bodies; + } + + /** + * @private + */ + public function set bodies(value:Array):void + { + _bodies = value; + } + + //---------------------------------- + // headers + //---------------------------------- + + /** + * @private + */ + private var _headers:Array = []; + + /** + * The array of MessageHeaders + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion BlazeDS 4 + * @productversion LCDS 3 + */ + public function get headers():Array + { + return _headers; + } + + /** + * @private + */ + public function set headers(value:Array):void + { + _headers = value; + } + + +} + +} http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a2afa568/frameworks/projects/Network/src/main/flex/org/apache/flex/net/remoting/messages/ErrorMessage.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/Network/src/main/flex/org/apache/flex/net/remoting/messages/ErrorMessage.as b/frameworks/projects/Network/src/main/flex/org/apache/flex/net/remoting/messages/ErrorMessage.as new file mode 100644 index 0000000..a20c095 --- /dev/null +++ b/frameworks/projects/Network/src/main/flex/org/apache/flex/net/remoting/messages/ErrorMessage.as @@ -0,0 +1,76 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +//////////////////////////////////////////////////////////////////////////////// + +package org.apache.flex.net.remoting.messages +{ + +[RemoteClass(alias="flex.messaging.messages.ErrorMessage")] + +/** + * ErrorMessages are sometimes returned from RPC requests to a remote endpoint. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion BlazeDS 4 + * @productversion LCDS 3 + */ +public class ErrorMessage extends AbstractMessage +{ + //-------------------------------------------------------------------------- + // + // Constructor + // + //-------------------------------------------------------------------------- + + /** + * Constructs an uninitialized ErrorMessage. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion BlazeDS 4 + * @productversion LCDS 3 + */ + public function ErrorMessage() + { + super(); + } + + //-------------------------------------------------------------------------- + // + // Variables + // + //-------------------------------------------------------------------------- + + /** + * Provides the error message. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion BlazeDS 4 + * @productversion LCDS 3 + */ + public var message:String; + + +} + +} http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a2afa568/frameworks/projects/Network/src/main/flex/org/apache/flex/net/remoting/messages/MessageBody.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/Network/src/main/flex/org/apache/flex/net/remoting/messages/MessageBody.as b/frameworks/projects/Network/src/main/flex/org/apache/flex/net/remoting/messages/MessageBody.as new file mode 100644 index 0000000..dc0cf2e --- /dev/null +++ b/frameworks/projects/Network/src/main/flex/org/apache/flex/net/remoting/messages/MessageBody.as @@ -0,0 +1,130 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +//////////////////////////////////////////////////////////////////////////////// + +/*** + * AMF JavaScript library by Emil Malinov https://github.com/emilkm/amfjs + */ + +package org.apache.flex.net.remoting.messages +{ + +COMPILE::SWF +{ +import flash.utils.IDataInput; +import flash.utils.IDataOutput; +} + +[RemoteClass(alias="flex.messaging.io.amf.MessageBody")] + +/** + * The MessageBody for an ActionMessage + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion BlazeDS 4 + * @productversion LCDS 3 + */ +public class MessageBody +{ + //-------------------------------------------------------------------------- + // + // Constructor + // + //-------------------------------------------------------------------------- + + /** + * Constructs an instance of a MessageBody + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion BlazeDS 4 + * @productversion LCDS 3 + */ + public function MessageBody() + { + super(); + } + + //-------------------------------------------------------------------------- + // + // Variables + // + //-------------------------------------------------------------------------- + + /** + * The target URI. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion BlazeDS 4 + * @productversion LCDS 3 + */ + public var targetURI:String = "null"; + + /** + * The response URI. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion BlazeDS 4 + * @productversion LCDS 3 + */ + public var responseURI:String = "/1"; + + //-------------------------------------------------------------------------- + // + // Properties + // + //-------------------------------------------------------------------------- + + //---------------------------------- + // data + //---------------------------------- + + /** + * @private + */ + private var _data:Object; + + /** + * The data to be sent. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion BlazeDS 4 + * @productversion LCDS 3 + */ + public function get data():Object + { + return _data; + } + + /** + * @private + */ + public function set data(value:Object):void + { + _data = value; + } + +} + +} http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a2afa568/frameworks/projects/Network/src/main/flex/org/apache/flex/net/remoting/messages/MessageHeader.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/Network/src/main/flex/org/apache/flex/net/remoting/messages/MessageHeader.as b/frameworks/projects/Network/src/main/flex/org/apache/flex/net/remoting/messages/MessageHeader.as new file mode 100644 index 0000000..88f3ff4 --- /dev/null +++ b/frameworks/projects/Network/src/main/flex/org/apache/flex/net/remoting/messages/MessageHeader.as @@ -0,0 +1,131 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +//////////////////////////////////////////////////////////////////////////////// + +/*** + * AMF JavaScript library by Emil Malinov https://github.com/emilkm/amfjs + */ + + +package org.apache.flex.net.remoting.messages +{ + +COMPILE::SWF +{ +import flash.utils.IDataInput; +import flash.utils.IDataOutput; +} + +[RemoteClass(alias="flex.messaging.io.amf.MessageHeader")] + +/** + * The MessageHeader for an ActionMessage + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion BlazeDS 4 + * @productversion LCDS 3 + */ +public class MessageHeader +{ + //-------------------------------------------------------------------------- + // + // Constructor + // + //-------------------------------------------------------------------------- + + /** + * Constructs an instance of a MessageHeader + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion BlazeDS 4 + * @productversion LCDS 3 + */ + public function MessageHeader() + { + super(); + } + + //-------------------------------------------------------------------------- + // + // Variables + // + //-------------------------------------------------------------------------- + + /** + * The header name. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion BlazeDS 4 + * @productversion LCDS 3 + */ + public var name:String = ""; + + /** + * Whether the receipient must understand the header + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion BlazeDS 4 + * @productversion LCDS 3 + */ + public var mustUnderstand:Boolean; + + //-------------------------------------------------------------------------- + // + // Properties + // + //-------------------------------------------------------------------------- + + //---------------------------------- + // data + //---------------------------------- + + /** + * @private + */ + private var _data:Object; + + /** + * The data to be sent. + * + * @langversion 3.0 + * @playerversion Flash 9 + * @playerversion AIR 1.1 + * @productversion BlazeDS 4 + * @productversion LCDS 3 + */ + public function get data():Object + { + return _data; + } + + /** + * @private + */ + public function set data(value:Object):void + { + _data = value; + } + +} + +}
