/** * * 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. */ /* Version 0.1 : R Jewson (rjewson at gmail dot com). First release, only for reciept of messages. Version 0.2s : Sheer Pullen (jonathanpullen at gmail dot com). Binary data transmission and reception Version 0.5 : Sheer Pullen - attempt to write legible comments */ package com.sheer.stomp { /* The STOMPClient class uses this class to send notifications of events. This class exists so that there is a more generic open-source version of the code */ import flash.events.Event; import com.sheer.stomp.STOMPMsg; public class STOMPEvent extends Event { // because these are sent once per message // and we have a lot of messages // we make them short in order to save CPU static public const ObjectMessageEvent:String = "OME"; static public const TextMessageEvent:String = "TME"; static public const BytesMessageEvent:String = "BME"; static public const ioErrorEvent:String = "ioErrorEvent"; static public const securityErrorEvent:String = "securityErrorEvent"; static public const SubscribeEvent:String = "SE"; static public const ConnectEvent:String = "CE"; static public const DisconnectEvent:String = "DE"; static public const NegotiatedEvent:String = "NE"; public var eventSummary:String; public var timeStamp:String; public var eventType:int = 1; public var eventMsg:STOMPMsg; public function STOMPEvent( eventType:String , _eventMsg:STOMPMsg ) { //trace("Creating STOMP event"); super(eventType,true,false); eventMsg = _eventMsg; } public override function clone():Event { return new STOMPEvent(type, eventMsg); } public function dumpeventMsg():void { if (eventMsg==null) { return; } for (var key:String in eventMsg) { } } } }