http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/bf2e1dc9/apps/ds-console/console/containers/DestinationManager.as ---------------------------------------------------------------------- diff --git a/apps/ds-console/console/containers/DestinationManager.as b/apps/ds-console/console/containers/DestinationManager.as deleted file mode 100755 index 71ca7bc..0000000 --- a/apps/ds-console/console/containers/DestinationManager.as +++ /dev/null @@ -1,238 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// -// 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 console.containers -{ - import console.data.Bindable3DHashMap; - import console.ConsoleManager; - import mx.collections.ArrayCollection; - import mx.events.ListEvent; - import flash.events.Event; - import mx.charts.LineChart; - import mx.charts.series.LineSeries; - import mx.controls.listClasses.ListBase; - import mx.events.CollectionEvent; - - public class DestinationManager extends UpdateListener - { - private static const pollableTypes:Array = [ - ConsoleManager.DESTINATION_POLLABLE ]; - - private var _manager:ConsoleManager; - private var display:DestinationManagerDisplay; - private var selectedDestinationId:String; - private var selectedMBean:String; - private var dataCache:Bindable3DHashMap; - private var pollableAttributes:Object; - - [Bindable] - private var selectedBeanProperties:ArrayCollection; - - [Bindable] - private var selectedPropertyValues:ArrayCollection; - - public override function dataUpdate(type:int, data:Object):void - { - var dataArray:ArrayCollection = new ArrayCollection; - - // This finds any exposed properties under any destination node and - // adds them to the proper data structures so that all data in MBeans - // underneath destinations can be accesed by the destination's id - for (var name:String in data) - { - var mapKey:String; - var mapValue:String; - - // Gets all properties for this MBean - var propertyArrayForMBean:Array = data[name]; - - // split the mbean name on the commas, then split on the periods and get the last - // type. if it contains destination, insert it into the array - // otherwise find the destination tag and insert it into it's data cache key. - var mbeanNames:Array = name.split(","); - - // find the actual type of this MBean, and if it is a Destination, we can use the id - // as the map key, otherwise, we have to find the MBean's parent which is a Destination - var types:Array = (mbeanNames[mbeanNames.length - 1] as String).split("."); - if ((types[types.length - 1] as String).indexOf("Destination") >= 0) - { - // we are going after the id pairing here, most often it will be the second - // to last pair but since WAS 6.1 inserts nodes and servers into - // the MBean name it may not be the case. For optimization we'll still - // go after the second to last pair, but will verify that this is indeed - // the id pair and if not will look for it explicitly. - var namePair:Array = (mbeanNames[mbeanNames.length - 2] as String).split("="); - - mapKey = namePair[0]; - mapValue = namePair[1]; - if (mapKey != "id") - { - // did not find id where expected go through entire name pair collection - // looking for the id pair - for each (var mbeanNamePair:String in mbeanNames) - { - var loopNamePair:Array = mbeanNamePair.split("="); - mapKey =loopNamePair[0]; - mapValue = loopNamePair[1]; - if (mapKey == "id") - { - break; - } - } - } - } - else - { - for each (var id:String in mbeanNames) - { - if (id.indexOf("Destination") >= 0) - { - // Get the Destination's id name as the key into the map - mapValue = id.split("=")[1]; - break; - } - } - } - - // For each property, add the property and value to the appropriate map - for (var i:int = 0; i < propertyArrayForMBean.length; i++) - { - if (pollableTypes.indexOf(type) >= 0) - dataCache.update(mapValue, propertyArrayForMBean[i].name, propertyArrayForMBean[i].value); - else - dataCache.updateNoPollable(mapValue, propertyArrayForMBean[i].name, propertyArrayForMBean[i].value) - } - } - } - - public override function mbeanModelUpdate(model:Object):void - { - refreshDestinations(); - } - - public function DestinationManager():void - { - super(); - display = new DestinationManagerDisplay; - this.addChild(display); - - this.label = "Destination Management"; - - _manager = ConsoleManager.getInstance(); - var registerTypes:Array = [ - {type: ConsoleManager.DESTINATION_GENERAL, poll: false}, - {type: ConsoleManager.DESTINATION_POLLABLE, poll: true}, - ]; - - _manager.registerListener(this, registerTypes); - display.dataList.addEventListener(ListEvent.CHANGE, selectedService); - display.httpList.addEventListener(ListEvent.CHANGE, selectedService); - display.messageList.addEventListener(ListEvent.CHANGE, selectedService); - display.remotingList.addEventListener(ListEvent.CHANGE, selectedService); - - display.destinationAttributes.addEventListener(ListEvent.CHANGE, selectedAttribute); - - pollableAttributes = new Object; - dataCache = new Bindable3DHashMap(); - - selectedBeanProperties = new ArrayCollection(); - selectedPropertyValues = new ArrayCollection(); - } - - private function selectedAttribute(e:Event):void - { - var property:String = e.target.selectedItem.Property as String; - var ret:ArrayCollection = dataCache.getBindableDataArray(selectedDestinationId, property); - if ((ret != null) && (ret.length >= 0)) - { - display.attrgraph.dataProvider = ret; - display.graphLabel.text = property; - } - /* - return; - - for (var type:* in pollableAttributes) - { - for each (var pollable:Object in pollableAttributes[type][selectedDestinationId]) - { - if (pollable.name == property) - { - display.attrgraph.dataProvider = dataCache.getBindableDataArray(selectedDestinationId, property); - display.graphLabel.text = property; - return; - } - } - } - */ - } - - private function selectedService(e:Event):void - { - selectedDestinationId = e.currentTarget.selectedItem.label; - selectedMBean = e.currentTarget.selectedItem.objectName.canonicalName.split(":")[1]; - display.destinationAttributes.dataProvider = dataCache.getBindableKeyArray(selectedDestinationId); - display.selectedProperty.text = e.currentTarget.selectedItem.label; - display.graphLabel.text = null; - display.attrgraph.dataProvider = null; - - if (e.currentTarget != display.httpList) - display.httpList.selectedIndex = -1; - if (e.currentTarget != display.messageList) - display.messageList.selectedIndex = -1; - if (e.currentTarget != display.dataList) - display.dataList.selectedIndex = -1; - if (e.currentTarget != display.remotingList) - display.remotingList.selectedIndex = -1; - } - - public override function appChanged(s:String):void - { - dataCache.clearData(); - refreshDestinations(); - display.destinationAttributes.dataProvider = null; - display.selectedProperty.text = null; - display.graphLabel.text = null; - display.attrgraph.dataProvider = null; - } - - private function refreshDestinations():void - { - // TODO: Handle not having any specific services gracefully - display.dataList.dataProvider = getChildTree("DataService"); - display.httpList.dataProvider = getChildTree("HTTPProxyService"); - display.messageList.dataProvider = getChildTree("MessageService"); - display.remotingList.dataProvider = getChildTree("RemotingService"); - } - - /** - * This is just a helper method to find the proper MBeans for each Service - * from the ConsoleManager's model. The model is a complicated structure - * of maps and arrays. - */ - private function getChildTree(child:String):Array - { - var childArray:Array = _manager.getChildTree(child); - if ((childArray.length > 0) && (childArray[0].hasOwnProperty("children"))) - childArray = childArray[0].children as Array; - if ((childArray.length > 0) && (childArray[0].hasOwnProperty("children"))) - childArray = childArray[0].children as Array; - - return childArray; - } - } -} \ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/bf2e1dc9/apps/ds-console/console/containers/DestinationManagerDisplay.mxml ---------------------------------------------------------------------- diff --git a/apps/ds-console/console/containers/DestinationManagerDisplay.mxml b/apps/ds-console/console/containers/DestinationManagerDisplay.mxml deleted file mode 100755 index 5e5d6a7..0000000 --- a/apps/ds-console/console/containers/DestinationManagerDisplay.mxml +++ /dev/null @@ -1,61 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - - 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. - ---> -<mx:Box xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"> - <mx:HDividedBox width="100%" height="100%"> - <mx:VDividedBox height="100%" width="350"> - <mx:DataGrid id="httpList" width="100%"> - <mx:columns> - <mx:DataGridColumn headerText="HTTP Proxy Service" dataField="label" /> - </mx:columns> - </mx:DataGrid> - <mx:DataGrid id="messageList" width="100%"> - <mx:columns> - <mx:DataGridColumn headerText="Message Service" dataField="label" /> - </mx:columns> - </mx:DataGrid> - <mx:DataGrid id="dataList" width="100%"> - <mx:columns> - <mx:DataGridColumn headerText="Data Service" dataField="label" /> - </mx:columns> - </mx:DataGrid> - <mx:DataGrid id="remotingList" width="100%"> - <mx:columns> - <mx:DataGridColumn headerText="Remoting Service" dataField="label" /> - </mx:columns> - </mx:DataGrid> - </mx:VDividedBox> - <mx:VDividedBox height="100%"> - <mx:HBox> - <mx:Label text="Selected Attribute" /> - <mx:Text id="selectedProperty" /> - </mx:HBox> - <mx:DataGrid id="destinationAttributes" width="100%" height="50%" /> - <mx:Label id="graphLabel" /> - <mx:LineChart id="attrgraph" width="100%"> - <mx:verticalAxis> - <mx:LinearAxis id="attrgraphAxis" /> - </mx:verticalAxis> - <mx:series> - <mx:LineSeries id="attrgraphSeries" yField="Value" /> - </mx:series> - </mx:LineChart> - </mx:VDividedBox> - </mx:HDividedBox> -</mx:Box> http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/bf2e1dc9/apps/ds-console/console/containers/EndpointManager.as ---------------------------------------------------------------------- diff --git a/apps/ds-console/console/containers/EndpointManager.as b/apps/ds-console/console/containers/EndpointManager.as deleted file mode 100755 index 0c7a538..0000000 --- a/apps/ds-console/console/containers/EndpointManager.as +++ /dev/null @@ -1,149 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// -// 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 console.containers -{ - import console.data.Bindable3DHashMap; - import console.ConsoleManager; - import mx.collections.ArrayCollection; - import mx.events.ListEvent; - import flash.events.Event; - import mx.charts.LineChart; - import mx.charts.series.LineSeries; - import mx.controls.listClasses.ListBase; - import mx.events.CollectionEvent; - - public class EndpointManager extends UpdateListener - { - private static const pollableTypes:Array = [ - ConsoleManager.ENDPOINT_POLLABLE ]; - - private var _manager:ConsoleManager; - private var display:EndpointManagerDisplay; - private var selectedMBean:String; - private var dataCache:Bindable3DHashMap; - private var pollableAttributes:Object; - - [Bindable] - private var selectedBeanProperties:ArrayCollection; - - [Bindable] - private var selectedPropertyValues:ArrayCollection; - - public override function dataUpdate(type:int, data:Object):void - { - var dataArray:ArrayCollection = new ArrayCollection; - - for (var name:String in data) - { - - var propertyArrayForMBean:Array = data[name]; - - for (var i:int = 0; i < propertyArrayForMBean.length; i++) - { - dataCache.update(name, propertyArrayForMBean[i].name, propertyArrayForMBean[i].value); - } - } - - if (pollableTypes.indexOf(type) >= 0) - pollableAttributes[type] = data; - } - - public override function mbeanModelUpdate(model:Object):void - { - refreshEndpoints(); - } - - public function EndpointManager():void - { - super(); - display = new EndpointManagerDisplay; - this.addChild(display); - - this.label = "Endpoint Management"; - - _manager = ConsoleManager.getInstance(); - var registerTypes:Array = [ - {type: ConsoleManager.ENDPOINT_POLLABLE, poll: true}, - {type: ConsoleManager.ENDPOINT_SCALAR, poll: false} - ] - _manager.registerListener(this, registerTypes); - display.rtmpEndpointsList.addEventListener(ListEvent.CHANGE, selectedEndpoint); - display.amfEndpointsList.addEventListener(ListEvent.CHANGE, selectedEndpoint); - display.httpEndpointsList.addEventListener(ListEvent.CHANGE, selectedEndpoint); - - display.endpointAttributes.addEventListener(ListEvent.CHANGE, selectedAttribute); - - pollableAttributes = new Object; - dataCache = new Bindable3DHashMap(); - - selectedBeanProperties = new ArrayCollection(); - selectedPropertyValues = new ArrayCollection(); - } - - private function selectedAttribute(e:Event):void - { - var property:String = e.currentTarget.selectedItem.Property as String; - for (var type:* in pollableAttributes) - { - for each (var pollable:Object in pollableAttributes[type][selectedMBean]) - { - if (pollable.name == property) - { - display.attrgraph.dataProvider = dataCache.getBindableDataArray(selectedMBean, property); - display.graphLabel.text = property; - return; - } - } - } - } - - private function selectedEndpoint(e:Event):void - { - selectedMBean = ((e.currentTarget.selectedItem.objectName.canonicalName as String).split(":") as Array)[1]; - display.endpointAttributes.dataProvider = dataCache.getBindableKeyArray(selectedMBean); - display.selectedProperty.text = e.currentTarget.selectedItem.label; - display.graphLabel.text = null; - display.attrgraph.dataProvider = null; - - if (e.currentTarget != display.amfEndpointsList) - display.amfEndpointsList.selectedIndex = -1; - if (e.currentTarget != display.httpEndpointsList) - display.httpEndpointsList.selectedIndex = -1; - if (e.currentTarget != display.rtmpEndpointsList) - display.rtmpEndpointsList.selectedIndex = -1; - } - - public override function appChanged(s:String):void - { - dataCache.clearData(); - refreshEndpoints(); - display.endpointAttributes.dataProvider = null; - display.selectedProperty.text = null; - display.graphLabel.text = null; - display.attrgraph.dataProvider = null; - } - - private function refreshEndpoints():void - { - display.httpEndpointsList.dataProvider = _manager.getChildTrees("HTTPEndpoint", "StreamingHTTPEndpoint", "NIOHTTPEndpoint", "StreamingNIOHTTPEndpoint"); - display.rtmpEndpointsList.dataProvider = _manager.getChildTree("RTMPEndpoint"); - display.amfEndpointsList.dataProvider = _manager.getChildTrees("AMFEndpoint", "StreamingAMFEndpoint", "NIOAMFEndpoint", "StreamingNIOAMFEndpoint"); - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/bf2e1dc9/apps/ds-console/console/containers/EndpointManagerDisplay.mxml ---------------------------------------------------------------------- diff --git a/apps/ds-console/console/containers/EndpointManagerDisplay.mxml b/apps/ds-console/console/containers/EndpointManagerDisplay.mxml deleted file mode 100755 index c5f69ef..0000000 --- a/apps/ds-console/console/containers/EndpointManagerDisplay.mxml +++ /dev/null @@ -1,56 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - - 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. - ---> -<mx:Box xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"> - <mx:HDividedBox width="100%" height="100%"> - <mx:VDividedBox height="100%" width="350"> - <mx:DataGrid id="rtmpEndpointsList" width="100%"> - <mx:columns> - <mx:DataGridColumn headerText="RTMP Endpoints" dataField="label" /> - </mx:columns> - </mx:DataGrid> - <mx:DataGrid id="httpEndpointsList" width="100%"> - <mx:columns> - <mx:DataGridColumn headerText="HTTP Endpoints" dataField="label" /> - </mx:columns> - </mx:DataGrid> - <mx:DataGrid id="amfEndpointsList" width="100%"> - <mx:columns> - <mx:DataGridColumn headerText="AMF Endpoints" dataField="label" /> - </mx:columns> - </mx:DataGrid> - </mx:VDividedBox> - <mx:VDividedBox height="100%"> - <mx:HBox> - <mx:Label text="Selected Endpoint" /> - <mx:Text id="selectedProperty" /> - </mx:HBox> - <mx:DataGrid id="endpointAttributes" width="100%" height="50%" /> - <mx:Label id="graphLabel" /> - <mx:LineChart id="attrgraph" width="100%"> - <mx:verticalAxis> - <mx:LinearAxis id="attrgraphAxis" /> - </mx:verticalAxis> - <mx:series> - <mx:LineSeries id="attrgraphSeries" yField="Value" /> - </mx:series> - </mx:LineChart> - </mx:VDividedBox> - </mx:HDividedBox> -</mx:Box> http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/bf2e1dc9/apps/ds-console/console/containers/LogManager.as ---------------------------------------------------------------------- diff --git a/apps/ds-console/console/containers/LogManager.as b/apps/ds-console/console/containers/LogManager.as deleted file mode 100755 index a44dc06..0000000 --- a/apps/ds-console/console/containers/LogManager.as +++ /dev/null @@ -1,189 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// -// 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 console.containers -{ - import console.ConsoleManager; - import flash.events.Event; - import mx.controls.ComboBox; - import console.events.ManagementOperationInvokeEvent; - import mx.events.ListEvent; - import flash.events.MouseEvent; - import mx.collections.ArrayCollection; - - public class LogManager extends UpdateListener - { - private var _manager:ConsoleManager; - private var _logMBean:String; - private var _logTree:Array; - private var display:LogManagerDisplay; - - public static var targetLevels:Array = new Array( - {label:"NONE", value:"2000"}, - {label:"FATAL", value:"1000"}, - {label:"ERROR", value:"8"}, - {label:"WARN", value:"6"}, - {label:"INFO", value:"4"}, - {label:"DEBUG", value:"2"}, - {label:"ALL", value:"0"} - ); - - public function LogManager():void - { - super(); - - display = new LogManagerDisplay; - this.addChild(display); - - this.label = "Log Manager"; - - _manager = ConsoleManager.getInstance(); - _manager.registerListener(this, []); - - // On selecting a log target, invoke 'getTargetFilters' to populate the table of filters - display.logTargetSelect.addEventListener(ListEvent.CHANGE, selectLogTarget); - display.logTargetLevel.dataProvider = targetLevels; - - // Handler for removing a target - display.deleteCategory.addEventListener(MouseEvent.CLICK, - function(e:Event):void { - - _manager.invokeOperation( - - new ManagementOperationInvokeEvent(_logMBean, - "removeFilterForTarget", - [display.logTargetSelect.selectedItem, display.currentCategories.selectedItem], - ["java.lang.String", "java.lang.String"]), - - function (e:Event):void { display.logTargetSelect.dispatchEvent( - new Event(ListEvent.CHANGE)); } ); - } - ); - - // Handler for adding a target - display.addFilterButton.addEventListener(MouseEvent.CLICK, - function(e:Event):void { - - _manager.invokeOperation( - - new ManagementOperationInvokeEvent(_logMBean, - "addFilterForTarget", - [display.logTargetSelect.selectedItem, display.addFilterTextInput.text], - ["java.lang.String", "java.lang.String"]), - // Simple callback function to refresh the Log View - function (e:Event):void { - display.logTargetSelect.dispatchEvent(new Event(ListEvent.CHANGE)); - display.addFilterTextInput.text = ""; - } - ); - } - ); - - // Handler for adding a target - display.addCommonFilterButton.addEventListener(MouseEvent.CLICK, - function(e:Event):void { - - _manager.invokeOperation( - - new ManagementOperationInvokeEvent(_logMBean, - "addFilterForTarget", - [display.logTargetSelect.selectedItem, display.commonCategories.selectedItem], - ["java.lang.String", "java.lang.String"]), - // Simple callback function to refresh the Log View - function (e:Event):void { - display.logTargetSelect.dispatchEvent(new Event(ListEvent.CHANGE)); - display.addFilterTextInput.text = ""; - } - ); - } - ); - - // Handler for changing the target's level - display.logTargetLevel.addEventListener(ListEvent.CHANGE, function(e:Event):void - { - _manager.invokeOperation( - - new ManagementOperationInvokeEvent(_logMBean, - "changeTargetLevel", - [display.logTargetSelect.selectedItem, display.logTargetLevel.selectedItem.value], - ["java.lang.String", "java.lang.String"]), - new Function - ); - } - ); - - } - - public override function mbeanModelUpdate(model:Object):void - { - _logTree = _manager.getChildTree("Log"); - if (_logTree != null && _logTree.length != 0) - { - _logMBean = _logTree[0]["objectName"]["canonicalName"]; - // Get the targets for the current application - _manager.getAttributes(_logMBean, ["Targets"], this, updateTargets); - _manager.getAttributes(_logMBean, ["Categories"], this, updateCommonCats); - } - } - - public override function appChanged(s:String):void - { - mbeanModelUpdate(null); - } - - public function updateCommonCats(e:Event):void - { - display.commonCategories.dataProvider = (e["result"] as Array)[0].value; - display.commonCategories.selectedIndex = 0; - display.commonCategories.dispatchEvent(new Event(ListEvent.CHANGE)); - } - - public function updateTargets(e:Event):void - { - var logTargets:Array = (e["result"] as Array)[0].value; - display.logTargetSelect.dataProvider = logTargets; - display.logTargetSelect.selectedIndex = 0; - display.logTargetSelect.dispatchEvent(new Event(ListEvent.CHANGE)); - } - - public function updateFilters(e:Event):void - { - display.currentCategories.dataProvider = e["result"] as Array; - } - - public function selectLogTarget(e:Event):void - { - _manager.invokeOperation(new ManagementOperationInvokeEvent(_logMBean, - "getTargetFilters", [display.logTargetSelect.selectedItem], ["java.lang.String"]), - updateFilters); - _manager.invokeOperation(new ManagementOperationInvokeEvent(_logMBean, - "getTargetLevel", [display.logTargetSelect.selectedItem], ["java.lang.String"]), - handleGetTargetLevel); - } - - public function handleGetTargetLevel(e:Event):void - { - var currentLevelInt:String = e["message"]["body"]; - for (var i:int = 0; i < targetLevels.length; i++) - { - if (targetLevels[i].value == currentLevelInt) - display.logTargetLevel.selectedIndex = i; - } - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/bf2e1dc9/apps/ds-console/console/containers/LogManagerDisplay.mxml ---------------------------------------------------------------------- diff --git a/apps/ds-console/console/containers/LogManagerDisplay.mxml b/apps/ds-console/console/containers/LogManagerDisplay.mxml deleted file mode 100755 index 969c9d4..0000000 --- a/apps/ds-console/console/containers/LogManagerDisplay.mxml +++ /dev/null @@ -1,54 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - - 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. - ---> -<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"> - <mx:HBox width="100%" height="100%"> - <mx:Form> - <mx:FormItem label="Log Target:"> - <mx:ComboBox id="logTargetSelect" /> - </mx:FormItem> - <mx:FormItem label="Target Level:"> - <mx:ComboBox id="logTargetLevel"></mx:ComboBox> - </mx:FormItem> - <mx:HRule width="100%"/> - <mx:FormItem label="Add a Custom Category"> - <mx:TextInput id="addFilterTextInput" /> - </mx:FormItem> - <mx:FormItem> - <mx:Button label="Add Category" id="addFilterButton" /> - </mx:FormItem> - </mx:Form> - <mx:VBox width="100%"> - <mx:DataGrid id="currentCategories" width="100%"> - <mx:columns> - <mx:DataGridColumn headerText="Current Categories" dataField="filters" /> - </mx:columns> - </mx:DataGrid> - <mx:Button label="Remove Category" id="deleteCategory" /> - </mx:VBox> - <mx:VBox width="100%"> - <mx:DataGrid id="commonCategories" width="100%"> - <mx:columns> - <mx:DataGridColumn headerText="Common Categories" dataField="common"/> - </mx:columns> - </mx:DataGrid> - <mx:Button label="Add Category" id="addCommonFilterButton" /> - </mx:VBox> - </mx:HBox> -</mx:VBox> http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/bf2e1dc9/apps/ds-console/console/containers/Operation.as ---------------------------------------------------------------------- diff --git a/apps/ds-console/console/containers/Operation.as b/apps/ds-console/console/containers/Operation.as deleted file mode 100755 index 2b9788e..0000000 --- a/apps/ds-console/console/containers/Operation.as +++ /dev/null @@ -1,169 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// -// 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 console.containers -{ - -import flash.events.MouseEvent; -import mx.containers.HBox; -import mx.controls.Button; -import mx.controls.Label; -import mx.controls.TextInput; -import mx.messaging.management.MBeanOperationInfo; -import mx.messaging.management.MBeanParameterInfo; - -/** - * The Operation container is an HBox that renders UI to invoke an operation on - * an MBean. When the operationInfo property of an Operation is set, the current - * UI for the Operation is torn down, and new UI is rendered based on the new - * MBeanOperationInfo metadata provided. - * <p> - * This container/control should not be instantiated directly. A parent OperationSet - * container will create nested Operations based on its MBean metadata. - */ -public class Operation extends HBox -{ - //-------------------------------------------------------------------------- - // - // Constructor - // - //-------------------------------------------------------------------------- - - /** - * @private - * Constructor. - */ - public function Operation(wrapper:OperationSet) - { - super(); - - _wrapper = wrapper; - _values = []; - _signature = []; - } - - /** - * @private - * The parent container. - */ - private var _wrapper:OperationSet; - - /** - * @private - * Array to store references to controls for each argument. - */ - private var _values:Array; - - /** - * @private - * Array to store the type signature for this operation. - */ - private var _signature:Array; - - //---------------------------------- - // MBeanOperationInfo - //---------------------------------- - - /** - * @private - * Storage for the operation info. - */ - private var _operationInfo:MBeanOperationInfo; - - /** - * MBean operation metadata that drives the UI for this component. - */ - public function get operationInfo():MBeanOperationInfo - { - return _operationInfo; - } - - public function set operationInfo(value:MBeanOperationInfo):void - { - var i:int; - - _operationInfo = value; - // Remove any existing children and refs to argument values. - _values.splice(0); - _signature.splice(0); - for (i = numChildren - 1; i >= 0; --i) - { - removeChildAt(i); - } - - // Build UI for this operation. - var opName:Button = new Button(); - opName.label = value.name; - opName.addEventListener("click", invokeOperation); - addChild(opName); - - var openParen:Label = new Label(); - openParen.text = " ("; - addChild(openParen); - - var comma:Label = new Label(); - comma.text = ", "; - var paramName:String; - var n:int = value.signature.length; - for (i = 0; i < n; ++i) - { - var pName:Label = new Label(); - paramName = value.signature[i].name; - if (paramName.length > 0) - { - pName.text = paramName; - } - else - { - pName.text = "p" + (i + 1); - } - addChild(pName); - var pValue:TextInput = new TextInput(); - addChild(pValue); - _values[i] = pValue; - _signature[i] = value.signature[i].type; - if (i != (n - 1)) - { - addChild(comma); - } - } - - var closeParen:Label = new Label(); - closeParen.text = " ) "; - addChild(closeParen); - } - - /** - * @private - * Calls back into the parent OperationSet to dispatch an - * event for this operation invocation request. - */ - private function invokeOperation(e:MouseEvent):void - { - var argsToPass:Array = []; - var n:int = _values.length; - for (var i:int = 0; i < n; ++i) - { - argsToPass.push(_values[i].text); - } - _wrapper.dispatchInvokeEvent(_operationInfo.name, argsToPass, _signature); - } -} - -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/bf2e1dc9/apps/ds-console/console/containers/OperationSet.as ---------------------------------------------------------------------- diff --git a/apps/ds-console/console/containers/OperationSet.as b/apps/ds-console/console/containers/OperationSet.as deleted file mode 100755 index 98ca6de..0000000 --- a/apps/ds-console/console/containers/OperationSet.as +++ /dev/null @@ -1,149 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// -// 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 console.containers -{ - -import console.events.ManagementOperationInvokeEvent; - -import mx.containers.*; -import mx.messaging.management.MBeanInfo; - -//-------------------------------------- -// Events -//-------------------------------------- - -/** - * Broadcast when a request has been made to invoke an Operation within this OperationSet. - */ -[Event(name="invoke", type="console.events.ManagementOperationInvokeEvent")] - -/** - * The OperationSet is a VBox containing an Operation for each operation exposed by a - * MBean. When the mbeanInfo property is set, the current UI of the OperationSet is torn - * down and new UI is built based upon the MBeanInfo metadata provided. - * - * <p><b>MXML Syntax</b></p> - * - * <p>The <code><mx:OperationSet></code> tag inherits all the properties - * of its parent classes and adds the following properties:</p> - * - * <p> - * <pre> - * <mx:Button - * mbeanInfo="<i>No default</i>." - * /> - * </pre> - * </p> - */ -public class OperationSet extends VBox -{ - //-------------------------------------------------------------------------- - // - // Constructor - // - //-------------------------------------------------------------------------- - - /** - * @private - * Constructor. - */ - public function OperationSet() - { - super(); - } - - - - - //---------------------------------- - // MBeanOperationInfo - //---------------------------------- - - private var _mbeanName:String; - public function set mbeanName(name:String):void - { - _mbeanName = name; - } - - /** - * @private - * Storage for the Mbean info. - */ - private var _mbeanInfo:MBeanInfo; - - /** - * MBean metadata to drive the UI for this component. - */ - public function get mbeanInfo():MBeanInfo - { - return _mbeanInfo; - } - - - private var _tabnav:TabNavigator; - public function set tabnav(p:TabNavigator):void - { - _tabnav = p; - } - - public function set mbeanInfo(value:MBeanInfo):void - { - var i:int; - - _mbeanInfo = value; - // Remove any existing children. - for (i = numChildren - 1; i >= 0; --i) - { - removeChildAt(i); - } - if (value != null) - { - var n:int = value.operations.length; - - // If there are no operations for this MBean, disable the Operations tab. - if (n == 0) - _tabnav.getTabAt(1).enabled = false; - - // Otherwise, build UI for the set of operations exposed by this MBean. - else - { - _tabnav.getTabAt(1).enabled = true; - for (i = 0; i < n; ++i) - { - var op:Operation = new Operation(this); - addChild(op); - op.operationInfo = value.operations[i]; - } - } - } - } - - /** - * Raises an operation invoke event for a nested Operation. - */ - public function dispatchInvokeEvent(name:String, values:Array, signature:Array):void - { - var event:ManagementOperationInvokeEvent = new ManagementOperationInvokeEvent(_mbeanName, name, values, signature); - dispatchEvent(event); - } - -} - -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/bf2e1dc9/apps/ds-console/console/containers/PollableAttributeChart.as ---------------------------------------------------------------------- diff --git a/apps/ds-console/console/containers/PollableAttributeChart.as b/apps/ds-console/console/containers/PollableAttributeChart.as deleted file mode 100755 index a8470c5..0000000 --- a/apps/ds-console/console/containers/PollableAttributeChart.as +++ /dev/null @@ -1,42 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// -// 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 console.containers -{ - import mx.charts.LineChart; - import mx.charts.series.LineSeries; - - public class PollableAttributeChart extends LineChart - { - function PollableAttributeChart(provider:Object):void - { - super(); - - dataProvider = provider; - this.percentHeight = 100; - this.percentWidth = 100; - - var series:LineSeries = new LineSeries; - series.dataProvider = provider; - series.yField = "value"; - this.addChild(series); - - initialize(); - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/bf2e1dc9/apps/ds-console/console/containers/ServerManager.as ---------------------------------------------------------------------- diff --git a/apps/ds-console/console/containers/ServerManager.as b/apps/ds-console/console/containers/ServerManager.as deleted file mode 100755 index 719556c..0000000 --- a/apps/ds-console/console/containers/ServerManager.as +++ /dev/null @@ -1,138 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// -// 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 console.containers -{ - import console.ConsoleManager; - import mx.collections.ArrayCollection; - import mx.events.ListEvent; - import flash.events.Event; - import mx.charts.LineChart; - import mx.charts.series.LineSeries; - import mx.utils.ObjectProxy; - import flash.utils.setInterval; - import mx.collections.ICollectionView; - import console.data.Bindable3DHashMap; - import flash.events.TextEvent; - import console.events.ManagementOperationInvokeEvent; - import mx.controls.DataGrid; - import mx.events.DataGridEvent; - import mx.events.FlexEvent; - - public class ServerManager extends UpdateListener - { - private var _manager:ConsoleManager; - private var display:ServerManagerDisplay; - private var dataCache:Bindable3DHashMap; - private var pollableAttributes:Object; - private var visibleTypes:Array; - - public function ServerManager():void - { - super(); - display = new ServerManagerDisplay; - this.addChild(display); - - this.label = "Server Management"; - display.scalarProperties.addEventListener(ListEvent.CHANGE, selectedScalar); - display.pollableProperties.addEventListener(ListEvent.CHANGE, selectedPollable); - _manager = ConsoleManager.getInstance(); - _manager.registerListener(this, [{type: ConsoleManager.GENERAL_OPERATION, poll: false}, - {type: ConsoleManager.GENERAL_SERVER, poll: false}, - {type: ConsoleManager.GENERAL_POLLABLE, poll: true}]); - setupDataCache(); - } - - public override function dataUpdate(type:int, data:Object):void - { - var dataArray:ArrayCollection = new ArrayCollection; - - for (var name:String in data) - { - - var propertyArrayForMBean:Array = data[name]; - - for (var i:int = 0; i < propertyArrayForMBean.length; i++) - { - dataCache.update(String(type), propertyArrayForMBean[i].name, propertyArrayForMBean[i].value); - } - } - - if (type == ConsoleManager.GENERAL_POLLABLE) - pollableAttributes = data; - } - - private function setupDataCache():void - { - dataCache = new Bindable3DHashMap(); - dataCache.update(String(ConsoleManager.GENERAL_OPERATION),null,null); - dataCache.update(String(ConsoleManager.GENERAL_POLLABLE),null,null); - dataCache.update(String(ConsoleManager.GENERAL_SERVER),null,null); - - display.scalarProperties.dataProvider = dataCache.getBindableKeyArray(String(ConsoleManager.GENERAL_SERVER)); - display.pollableProperties.dataProvider = dataCache.getBindableKeyArray(String(ConsoleManager.GENERAL_POLLABLE)); - } - - private function invokeOp(mbean:String, operation:String, value:String):void - { - _manager.invokeOperation( - new ManagementOperationInvokeEvent(mbean, operation, [value], ["java.lang.String"]), - function (e:Event):void { - - } - ); - } - - private function selectedScalar(e:Event):void - { - // It's possible that the data has changed since it was clicked because of polling - // if the selected item is null, then return. - // TODO: Handle this more gracefully. - if (display.scalarProperties.selectedItem == -1) return; - - var attr:String = display.scalarProperties.selectedItem.propertyName; - var mbean:String = display.scalarProperties.selectedItem.mbeanName; - display.selectedProperty.text = attr; - display.pollableProperties.selectedIndex = -1; - } - - private function selectedPollable(e:Event):void - { - // It's possible that the data has changed since it was clicked because of polling - // if the selected item is null, then return. - // TODO: Handle this more gracefully. - if (display.pollableProperties.selectedItem == null) return; - - var attr:String = display.pollableProperties.selectedItem.Property - display.selectedProperty.text = attr; - - display.attrgraph.dataProvider = dataCache.getBindableDataArray(String(ConsoleManager.GENERAL_POLLABLE), attr); - display.attrgraphSeries.dataProvider = dataCache.getBindableDataArray(String(ConsoleManager.GENERAL_POLLABLE), attr); - display.scalarProperties.selectedIndex = -1; - } - - public override function appChanged(s:String):void - { - display.attrgraph.dataProvider = null; - display.attrgraphSeries.dataProvider = null; - display.selectedProperty.text = "None"; - setupDataCache(); - _manager.updateData(this); - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/bf2e1dc9/apps/ds-console/console/containers/ServerManagerDisplay.mxml ---------------------------------------------------------------------- diff --git a/apps/ds-console/console/containers/ServerManagerDisplay.mxml b/apps/ds-console/console/containers/ServerManagerDisplay.mxml deleted file mode 100755 index 2bf1152..0000000 --- a/apps/ds-console/console/containers/ServerManagerDisplay.mxml +++ /dev/null @@ -1,54 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - - 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. - ---> -<mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"> - <mx:HDividedBox width="100%" height="100%"> - <mx:VBox height="100%" width="400"> - <mx:DataGrid id="scalarProperties" width="100%"> - <mx:columns> - <mx:DataGridColumn dataField="mbeanName" visible="false" /> - <mx:DataGridColumn headerText="Scalar Property" dataField="Property" /> - <mx:DataGridColumn headerText="Value" dataField="Value" /> - </mx:columns> - </mx:DataGrid> - <mx:DataGrid id="pollableProperties" width="100%"> - <mx:columns> - <mx:DataGridColumn dataField="mbeanName" visible="false" /> - <mx:DataGridColumn headerText="Graphable Property" dataField="Property" /> - <mx:DataGridColumn headerText="Value" dataField="Value" /> - </mx:columns> - </mx:DataGrid> - </mx:VBox> - <mx:VDividedBox height="100%"> - <mx:HBox> - <mx:Label text="Selected Attribute" /> - <mx:Text id="selectedProperty" /> - </mx:HBox> - <mx:LineChart id="attrgraph" width="100%" height="100%"> - <mx:verticalAxis> - <mx:LinearAxis id="attrgraphAxis" baseAtZero="false" /> - </mx:verticalAxis> - <mx:series> - <mx:LineSeries id="attrgraphSeries" yField="Value" /> - </mx:series> - </mx:LineChart> - </mx:VDividedBox> - </mx:HDividedBox> - -</mx:Panel> http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/bf2e1dc9/apps/ds-console/console/containers/UpdateListener.as ---------------------------------------------------------------------- diff --git a/apps/ds-console/console/containers/UpdateListener.as b/apps/ds-console/console/containers/UpdateListener.as deleted file mode 100755 index bd3a464..0000000 --- a/apps/ds-console/console/containers/UpdateListener.as +++ /dev/null @@ -1,109 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// -// 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 console.containers -{ - import mx.containers.Canvas; - import console.data.Bindable3DHashMap; - import mx.collections.ArrayCollection; - import mx.messaging.management.ObjectName; - - public class UpdateListener extends Canvas - { - protected var _name:String; - protected var _model:Object; - - /** - * Invoked when the names of the mbeans are retrieved from the server. - */ - public function mbeanModelUpdate(mbeanModel:Object):void - { - - } - - /** - * Invoked when the data for a given type is updated if the implementing class - * is registered with the ConsoleManager for the type, and if the implementing class - * is set to active in the ConsoleManager. - */ - public function dataUpdate(type:int, data:Object):void - { - - } - - /** - * Invoked when the selected application has changed. An implementing class might - * want to clear any data it is holding onto since the data will be belonging to - * objects in an application's MBeans that are no longer being queried. - */ - public function appChanged(s:String):void - { - - } - - /** - * If the container only wishes to query a select number of MBeans upon dataUpdate, they should be - * visible in a map keyed on the display type containing arrays of the MBean names. - * - * If a null value, or any object that the ConsoleManager can't parse, then all - * MBeans for all active types are returned upon dataUpdate. - */ - public function get specificMBeansMap():Object - { - return null; - } - - protected function traverseTreeForObject(node:Object, searchType:String = null, searchObject:String = null):Object - { - if (node == null) - { - return null; - } - else if (node.hasOwnProperty("type")) - { - // Node is a container of objects of 'type' - if (searchType != null) - { - if (node.type == searchObject) - return node; - } - } - else if (node.hasOwnProperty("objectName")) - { - // Node is a specific object, an instance of parent 'type' - if (searchObject != null) - { - if ((node.objectName as ObjectName).getKeyProperty("id") == searchObject) - return node; - } - } - - // recur - if (node.hasOwnProperty("children") && (node.children is Array)) - { - for each (var child:Object in (node.children as Array)) - { - traverseTreeForObject(child, searchType, searchObject); - } - } - - // not found - return null; - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/bf2e1dc9/apps/ds-console/console/containers/UpdateManager.as ---------------------------------------------------------------------- diff --git a/apps/ds-console/console/containers/UpdateManager.as b/apps/ds-console/console/containers/UpdateManager.as deleted file mode 100755 index 1f6d7ec..0000000 --- a/apps/ds-console/console/containers/UpdateManager.as +++ /dev/null @@ -1,28 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// -// 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 console.containers -{ - public interface UpdateManager - { - function registerListener(listner:UpdateListener, types:Array):void; - function unregisterListener(listner:UpdateListener):void; - function activateListener(listener:UpdateListener):void; - function deactivateListener(listener:UpdateListener):void; - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/bf2e1dc9/apps/ds-console/console/data/Bindable3DHashMap.as ---------------------------------------------------------------------- diff --git a/apps/ds-console/console/data/Bindable3DHashMap.as b/apps/ds-console/console/data/Bindable3DHashMap.as deleted file mode 100755 index 5e4088f..0000000 --- a/apps/ds-console/console/data/Bindable3DHashMap.as +++ /dev/null @@ -1,110 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// -// 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 console.data -{ - import mx.collections.ArrayCollection; - import mx.utils.ObjectProxy; - import flash.events.Event; - import mx.events.PropertyChangeEvent; - import mx.events.CollectionEvent; - import mx.controls.listClasses.ListBase; - - public class Bindable3DHashMap - { - public var objects:ObjectProxy; - public var objectsForKeyArray:ObjectProxy; - - public function Bindable3DHashMap() - { - objects = new ObjectProxy; - objectsForKeyArray = new ObjectProxy; - } - - public function updateNoPollable(object:String, key:String, value:*):void - { - if (!objectsForKeyArray.hasOwnProperty(object)) - objectsForKeyArray[object] = new ArrayCollection; - - if (!key) - return; - - var keysForKeyArray:ArrayCollection = objectsForKeyArray[object] as ArrayCollection; - - var foundKey:Boolean = false; - for (var i:int = 0; i < keysForKeyArray.length; i++) - { - if ((keysForKeyArray[i].hasOwnProperty("Property")) && (keysForKeyArray[i]["Property"] == key)) - { - keysForKeyArray[i]["Value"] = value; - foundKey = true; - break; - } - } - - if (!foundKey) - keysForKeyArray.addItem({Property: key, Value:value}); - - keysForKeyArray.dispatchEvent(new CollectionEvent(CollectionEvent.COLLECTION_CHANGE)); - } - - public function update(object:String, key:String, value:*):void - { - if (!objects.hasOwnProperty(object)) - { - objects[object] = new ObjectProxy; - } - - if (!key) - return; - - var keys:ObjectProxy = objects[object] as ObjectProxy; - - if (!keys.hasOwnProperty(key)) - keys[key] = new ArrayCollection; - - (keys[key] as ArrayCollection).addItem({Name: key, Value: value}); - (keys[key] as ArrayCollection).dispatchEvent(new CollectionEvent(CollectionEvent.COLLECTION_CHANGE)); - - updateNoPollable(object, key, value); - } - - public function getBindableKeyArray(object:String):ArrayCollection - { - if (!objectsForKeyArray.hasOwnProperty(object)) - objectsForKeyArray[object] = new ArrayCollection; - - return (objectsForKeyArray[object] as ArrayCollection); - } - - public function getBindableDataArray(object:String, key:String):ArrayCollection - { - if (!objects.hasOwnProperty(object)) - objects[object] = new ObjectProxy; - - var keys:ObjectProxy = objects[object] as ObjectProxy; - return keys[key] as ArrayCollection; - } - - public function clearData():void - { - objects = new ObjectProxy; - objectsForKeyArray = new ObjectProxy; - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/bf2e1dc9/apps/ds-console/console/events/ManagementOperationInvokeEvent.as ---------------------------------------------------------------------- diff --git a/apps/ds-console/console/events/ManagementOperationInvokeEvent.as b/apps/ds-console/console/events/ManagementOperationInvokeEvent.as deleted file mode 100755 index 1390c4d..0000000 --- a/apps/ds-console/console/events/ManagementOperationInvokeEvent.as +++ /dev/null @@ -1,99 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// -// 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 console.events -{ - -import flash.events.Event; - -/** - * Used to request that an MBean operation be invoked. - */ -public class ManagementOperationInvokeEvent extends Event -{ - /** - * Constructs an instance of this event with the specified type, target, - * and message. - */ - public function ManagementOperationInvokeEvent(mbean:String, name:String, values:Array, signature:Array) - { - super(INVOKE, false, false); - _mbean = mbean; - _name = name; - _values = values; - _signature = signature; - } - - /** - * The mbean of the operation to invoke. - */ - public function get mbean():String - { - return _mbean; - } - - /** - * The name of the operation to invoke. - */ - public function get name():String - { - return _name; - } - - /** - * The argument values for the operation. - */ - public function get values():Array - { - return _values; - } - - /** - * The type signature for operation arguments. - */ - public function get signature():Array - { - return _signature; - } - - /** - * Because this event can be re-dispatched we have to implement clone to - * return the appropriate type, otherwise we will get just the standard - * event type. - * - * @return Clone of this <code>ManagementOperationInvokeEvent</code> - */ - override public function clone():Event - { - return new ManagementOperationInvokeEvent(_mbean, _name, _values, _signature); - } - - /** - * The event type. - */ - public static const INVOKE:String = "invoke"; - - // private members - private var _name:String; - private var _values:Array; - private var _signature:Array; - private var _mbean:String; -} - -} http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/bf2e1dc9/apps/samples-spring/README.txt ---------------------------------------------------------------------- diff --git a/apps/samples-spring/README.txt b/apps/samples-spring/README.txt deleted file mode 100755 index 16c2166..0000000 --- a/apps/samples-spring/README.txt +++ /dev/null @@ -1,5 +0,0 @@ -All of the files contained in this directory and any subdirectories are -considered "Sample Code" under the terms of the end user license agreement -that accompanies this product. Please consult such end user license agreement -for details about your rights with respect to such files. - http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/bf2e1dc9/apps/samples-spring/WEB-INF/classes/commons-logging.properties ---------------------------------------------------------------------- diff --git a/apps/samples-spring/WEB-INF/classes/commons-logging.properties b/apps/samples-spring/WEB-INF/classes/commons-logging.properties deleted file mode 100755 index 46c3be4..0000000 --- a/apps/samples-spring/WEB-INF/classes/commons-logging.properties +++ /dev/null @@ -1,19 +0,0 @@ -# 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. - -# suppress logging for 3rd-party libraries using commons-logging -# Flex logging is not configured here. It is configured through in the logging section of flex-config.xml -org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.LogFactoryImpl -org.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/bf2e1dc9/apps/samples-spring/WEB-INF/flex-servlet.xml ---------------------------------------------------------------------- diff --git a/apps/samples-spring/WEB-INF/flex-servlet.xml b/apps/samples-spring/WEB-INF/flex-servlet.xml deleted file mode 100755 index 158453b..0000000 --- a/apps/samples-spring/WEB-INF/flex-servlet.xml +++ /dev/null @@ -1,70 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - 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. - ---> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:flex="http://www.springframework.org/schema/flex" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation=" - http://www.springframework.org/schema/beans - http://www.springframework.org/schema/beans/spring-beans-3.0.xsd - http://www.springframework.org/schema/flex - http://www.springframework.org/schema/flex/spring-flex-1.5.xsd"> - - <flex:message-broker> - <flex:message-service - default-channels="my-streaming-amf,my-longpolling-amf,my-polling-amf" /> - <flex:secured /> - </flex:message-broker> - - <!-- Expose the productService bean for BlazeDS remoting --> - <flex:remoting-destination ref="productService" /> - - <!-- Expose the contactService bean for BlazeDS remoting --> - <flex:remoting-destination ref="contactService" /> - - <!-- Expose the securedProductService bean for BlazeDS remoting --> - <flex:remoting-destination ref="securedProductService" /> - - <!-- Helper for getting the currently authenticated user --> - <bean id="securityHelper" class="org.springframework.flex.samples.secured.Security3Helper"> - <flex:remoting-destination/> - </bean> - - <!-- Messaging destinations --> - <flex:message-destination id="chat" /> - <flex:message-destination id="simple-feed" /> - <flex:message-destination id="market-feed" allow-subtopics="true" subtopic-separator="." /> - - <!-- MessageTemplate makes it easy to publish messages --> - <bean id="defaultMessageTemplate" class="org.springframework.flex.messaging.MessageTemplate" /> - - <!-- Pojo used to start and stop the data feed that pushes data in the 'simple-feed' destination --> - <bean id="simpleFeedStarter" class="org.springframework.flex.samples.simplefeed.SimpleFeed"> - <constructor-arg ref="defaultMessageTemplate" /> - <flex:remoting-destination /> - </bean> - - <!-- Pojo used to start and stop the data feed that pushes data in the 'market-feed' destination --> - <bean id="marketFeedStarter" class="org.springframework.flex.samples.marketfeed.MarketFeed"> - <constructor-arg ref="defaultMessageTemplate" /> - <constructor-arg value="stocklist.xml" /> - <flex:remoting-destination /> - </bean> - -</beans> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/bf2e1dc9/apps/samples-spring/WEB-INF/flex-src/chat/.actionScriptProperties ---------------------------------------------------------------------- diff --git a/apps/samples-spring/WEB-INF/flex-src/chat/.actionScriptProperties b/apps/samples-spring/WEB-INF/flex-src/chat/.actionScriptProperties deleted file mode 100755 index b5390a8..0000000 --- a/apps/samples-spring/WEB-INF/flex-src/chat/.actionScriptProperties +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- - - 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. - ---> -<actionScriptProperties mainApplicationPath="chat.mxml" projectUUID="46e6c4ea-bda5-466a-9d9a-a020928ae0f8" version="6"> - <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="true" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true"> - <compilerSourcePath/> - <libraryPath defaultLinkType="0"> - <libraryPathEntry kind="4" path=""> - <excludedEntries> - <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/> - </excludedEntries> - </libraryPathEntry> - <libraryPathEntry kind="1" linkType="1" path="libs"/> - </libraryPath> - <sourceAttachmentPath/> - </compiler> - <applications> - <application path="chat.mxml"/> - </applications> - <modules/> - <buildCSSFiles/> -</actionScriptProperties> http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/bf2e1dc9/apps/samples-spring/WEB-INF/flex-src/chat/.flexProperties ---------------------------------------------------------------------- diff --git a/apps/samples-spring/WEB-INF/flex-src/chat/.flexProperties b/apps/samples-spring/WEB-INF/flex-src/chat/.flexProperties deleted file mode 100755 index 1d99468..0000000 --- a/apps/samples-spring/WEB-INF/flex-src/chat/.flexProperties +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- - - 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. - ---> -<flexProperties enableServiceManager="false" flexServerFeatures="0" flexServerType="0" toolCompile="true" useServerFlexSDK="false" version="2"/> http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/bf2e1dc9/apps/samples-spring/WEB-INF/flex-src/chat/.project ---------------------------------------------------------------------- diff --git a/apps/samples-spring/WEB-INF/flex-src/chat/.project b/apps/samples-spring/WEB-INF/flex-src/chat/.project deleted file mode 100755 index 0cb0ea0..0000000 --- a/apps/samples-spring/WEB-INF/flex-src/chat/.project +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - 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. - ---> -<projectDescription> - <name>chat</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>com.adobe.flexbuilder.project.flexbuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>com.adobe.flexbuilder.project.flexnature</nature> - <nature>com.adobe.flexbuilder.project.actionscriptnature</nature> - </natures> -</projectDescription> http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/bf2e1dc9/apps/samples-spring/WEB-INF/flex-src/chat/build.xml ---------------------------------------------------------------------- diff --git a/apps/samples-spring/WEB-INF/flex-src/chat/build.xml b/apps/samples-spring/WEB-INF/flex-src/chat/build.xml deleted file mode 100755 index e5ee6d4..0000000 --- a/apps/samples-spring/WEB-INF/flex-src/chat/build.xml +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0"?> -<!-- - - 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. - ---> -<project name="samples-spring.war/build.xml" default="main" basedir="../../../../../"> - - <property environment="env" /> - <property file="${basedir}/build.properties"/> - <property name="samples-spring.war" value="${basedir}/apps/samples-spring"/> - <property name="context.root" value="samples-spring" /> - <property name="application.name" value="chat" /> - <property name="application.file" value="chat" /> - <property name="application.bin.dir" value="${samples-spring.war}/chat" /> - <property name="application.src.dir" value="${samples-spring.war}/WEB-INF/flex-src/chat/src" /> - - <target name="main" depends="clean,compile-swf" /> - - <target name="compile-swf"> - - <taskdef resource="flexTasks.tasks" classpath="${basedir}/ant/lib/flexTasks.jar" /> - - <property name="FLEX_HOME" value="${basedir}"/> - - <mxmlc file="${application.src.dir}/${application.file}.mxml" - output="${application.bin.dir}/${application.file}.swf" - actionscript-file-encoding="UTF-8" - keep-generated-actionscript="false" - incremental="false" - services="${samples-spring.war}/WEB-INF/flex/services-config.xml" - context-root="${context.root}" - locale="en_US"> - <load-config filename="${basedir}/frameworks/flex-config.xml"/> - <license product="flexbuilder3" serial-number="${env.fb3_license}"/> - <source-path path-element="${basedir}/frameworks"/> - <external-library-path/> - <metadata> - <publisher name="${manifest.Implementation-Vendor}" /> - <creator name="${manifest.Implementation-Vendor}" /> - </metadata> - </mxmlc> - - <html-wrapper title="${application.name}" - height="100%" - width="100%" - application="app" - swf="${application.file}" - version-major="10" - version-minor="0" - version-revision="0" - output="${application.bin.dir}"/> - - </target> - - <target name="clean" description="--> Removes jars and classes"> - <delete quiet="true" includeemptydirs="true"> - <fileset dir="${application.bin.dir}" includes="*.swf,index.html"/> - <fileset dir="${application.bin.dir}/history" /> - </delete> - </target> - -</project>
