You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by cd...@apache.org on 2014/05/05 22:08:51 UTC
[37/51] [partial] FLEX-34306 - [BlazeDS] Make the BlazeDS build run
on Windows machines - Added some mkdir commands to the ANT Build.java - Did
some fine-tuning to resolve some compile errors
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/4f6a3052/modules/core/src/flex/management/jmx/ObjectName.java
----------------------------------------------------------------------
diff --git a/modules/core/src/flex/management/jmx/ObjectName.java b/modules/core/src/flex/management/jmx/ObjectName.java
old mode 100755
new mode 100644
index 2c3356e..04ffa18
--- a/modules/core/src/flex/management/jmx/ObjectName.java
+++ b/modules/core/src/flex/management/jmx/ObjectName.java
@@ -1,99 +1,99 @@
-/*
- * 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 flex.management.jmx;
-
-import java.util.Hashtable;
-import javax.management.MalformedObjectNameException;
-
-/**
- * Remotable ObjectName representation that complies with Flash serialization requirements.
- * This class is JMX 1.1 compliant.
- *
- * @author shodgson
- */
-public class ObjectName
-{
- /**
- * String representation of the list of key properties sorted in lexical order.
- */
- public String canonicalKeyPropertyListString;
-
- /**
- * Canonical form of the name with properties sorted in lexical order.
- */
- public String canonicalName;
-
- /**
- * The domain part of the object name.
- */
- public String domain;
-
- /**
- * A Hashtable containing key-property pairs.
- */
- public Hashtable keyPropertyList;
-
- /**
- * String representation of the key properties.
- */
- public String keyPropertyListString;
-
- /**
- * Indicates whether the object name is a pattern.
- */
- public boolean pattern;
-
- /**
- * Indicates whether the object name is a pattern on key properties.
- */
- public boolean propertyPattern;
-
- /**
- * Constructs an empty <code>ObjectName</code> instance.
- */
- public ObjectName()
- {}
-
- /**
- * Constructs a <code>ObjectName</code> instance based upon a
- * <code>javax.management.ObjectName</code> instance.
- *
- * @param objectName The JMX <code>ObjectName</code> instance to base this instance on.
- */
- public ObjectName(javax.management.ObjectName objectName)
- {
- canonicalKeyPropertyListString = objectName.getCanonicalKeyPropertyListString();
- canonicalName = objectName.getCanonicalName();
- domain = objectName.getDomain();
- keyPropertyList = objectName.getKeyPropertyList();
- keyPropertyListString = objectName.getKeyPropertyListString();
- pattern = objectName.isPattern();
- propertyPattern = objectName.isPropertyPattern();
- }
-
- /**
- * Utility method to convert this <code>ObjectName</code> to a
- * <code>javax.management.ObjectName</code> instance.
- *
- * @return A JMX <code>ObjectName</code> based upon this instance.
- */
- public javax.management.ObjectName toObjectName() throws MalformedObjectNameException
- {
- return new javax.management.ObjectName(domain, keyPropertyList);
- }
-
-}
+/*
+ * 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 flex.management.jmx;
+
+import java.util.Hashtable;
+import javax.management.MalformedObjectNameException;
+
+/**
+ * Remotable ObjectName representation that complies with Flash serialization requirements.
+ * This class is JMX 1.1 compliant.
+ *
+ * @author shodgson
+ */
+public class ObjectName
+{
+ /**
+ * String representation of the list of key properties sorted in lexical order.
+ */
+ public String canonicalKeyPropertyListString;
+
+ /**
+ * Canonical form of the name with properties sorted in lexical order.
+ */
+ public String canonicalName;
+
+ /**
+ * The domain part of the object name.
+ */
+ public String domain;
+
+ /**
+ * A Hashtable containing key-property pairs.
+ */
+ public Hashtable keyPropertyList;
+
+ /**
+ * String representation of the key properties.
+ */
+ public String keyPropertyListString;
+
+ /**
+ * Indicates whether the object name is a pattern.
+ */
+ public boolean pattern;
+
+ /**
+ * Indicates whether the object name is a pattern on key properties.
+ */
+ public boolean propertyPattern;
+
+ /**
+ * Constructs an empty <code>ObjectName</code> instance.
+ */
+ public ObjectName()
+ {}
+
+ /**
+ * Constructs a <code>ObjectName</code> instance based upon a
+ * <code>javax.management.ObjectName</code> instance.
+ *
+ * @param objectName The JMX <code>ObjectName</code> instance to base this instance on.
+ */
+ public ObjectName(javax.management.ObjectName objectName)
+ {
+ canonicalKeyPropertyListString = objectName.getCanonicalKeyPropertyListString();
+ canonicalName = objectName.getCanonicalName();
+ domain = objectName.getDomain();
+ keyPropertyList = objectName.getKeyPropertyList();
+ keyPropertyListString = objectName.getKeyPropertyListString();
+ pattern = objectName.isPattern();
+ propertyPattern = objectName.isPropertyPattern();
+ }
+
+ /**
+ * Utility method to convert this <code>ObjectName</code> to a
+ * <code>javax.management.ObjectName</code> instance.
+ *
+ * @return A JMX <code>ObjectName</code> based upon this instance.
+ */
+ public javax.management.ObjectName toObjectName() throws MalformedObjectNameException
+ {
+ return new javax.management.ObjectName(domain, keyPropertyList);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/4f6a3052/modules/core/src/flex/management/jmx/package-info.java
----------------------------------------------------------------------
diff --git a/modules/core/src/flex/management/jmx/package-info.java b/modules/core/src/flex/management/jmx/package-info.java
old mode 100755
new mode 100644
index 638bdf6..fa47d96
--- a/modules/core/src/flex/management/jmx/package-info.java
+++ b/modules/core/src/flex/management/jmx/package-info.java
@@ -1,17 +1,17 @@
-/*
- * 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.
- */
+/*
+ * 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 flex.management.jmx;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/4f6a3052/modules/core/src/flex/management/package-info.java
----------------------------------------------------------------------
diff --git a/modules/core/src/flex/management/package-info.java b/modules/core/src/flex/management/package-info.java
old mode 100755
new mode 100644
index 814e6ef..46ac51b
--- a/modules/core/src/flex/management/package-info.java
+++ b/modules/core/src/flex/management/package-info.java
@@ -1,17 +1,17 @@
-/*
- * 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.
- */
+/*
+ * 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 flex.management;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/4f6a3052/modules/core/src/flex/management/runtime/AdminConsoleDisplayRegistrar.java
----------------------------------------------------------------------
diff --git a/modules/core/src/flex/management/runtime/AdminConsoleDisplayRegistrar.java b/modules/core/src/flex/management/runtime/AdminConsoleDisplayRegistrar.java
old mode 100755
new mode 100644
index 222aafa..dd85000
--- a/modules/core/src/flex/management/runtime/AdminConsoleDisplayRegistrar.java
+++ b/modules/core/src/flex/management/runtime/AdminConsoleDisplayRegistrar.java
@@ -1,104 +1,104 @@
-/*
- * 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 flex.management.runtime;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-
-import flex.management.BaseControl;
-
-/**
- * @exclude
- */
-public class AdminConsoleDisplayRegistrar extends BaseControl implements AdminConsoleDisplayRegistrarMBean
-{
- public static final String ID = "AdminConsoleDisplay";
-
- private HashMap registeredExposedObjects;
-
- public AdminConsoleDisplayRegistrar(BaseControl parent)
- {
- super(parent);
- registeredExposedObjects = new HashMap();
- register();
- }
-
- public void registerObject(int type, String beanName, String propertyName)
- {
- Object objects = registeredExposedObjects.get(new Integer(type));
- if (objects != null)
- {
- ((ArrayList)objects).add(beanName + ":" + propertyName);
- }
- else
- {
- if (type < 1)
- return;
-
- objects = new ArrayList();
- ((ArrayList)objects).add(beanName + ":" + propertyName);
- registeredExposedObjects.put(new Integer(type), objects);
- }
- }
-
- public void registerObjects(int type, String beanName, String[] propertyNames)
- {
- for (int i = 0; i < propertyNames.length; i++)
- {
- registerObject(type, beanName, propertyNames[i]);
- }
- }
-
- public void registerObjects(int[] types, String beanName, String[] propertyNames)
- {
- for (int j = 0; j < types.length; j++)
- {
- registerObjects(types[j], beanName, propertyNames);
- }
- }
-
- public Integer[] getSupportedTypes() throws IOException
- {
- Object[] array = registeredExposedObjects.keySet().toArray();
- Integer[] types = new Integer[array.length];
- for (int i = 0; i < array.length; i++)
- {
- types[i] = (Integer)array[i];
- }
- return types;
- }
-
- public String[] listForType(int type) throws IOException
- {
- Object list = registeredExposedObjects.get(new Integer(type));
-
- return (list != null) ? (String[]) ((ArrayList)list).toArray(new String[0]) : new String[0];
- }
-
- public String getId()
- {
- return ID;
- }
-
- public String getType()
- {
- return ID;
- }
-
-
-}
+/*
+ * 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 flex.management.runtime;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import flex.management.BaseControl;
+
+/**
+ * @exclude
+ */
+public class AdminConsoleDisplayRegistrar extends BaseControl implements AdminConsoleDisplayRegistrarMBean
+{
+ public static final String ID = "AdminConsoleDisplay";
+
+ private HashMap registeredExposedObjects;
+
+ public AdminConsoleDisplayRegistrar(BaseControl parent)
+ {
+ super(parent);
+ registeredExposedObjects = new HashMap();
+ register();
+ }
+
+ public void registerObject(int type, String beanName, String propertyName)
+ {
+ Object objects = registeredExposedObjects.get(new Integer(type));
+ if (objects != null)
+ {
+ ((ArrayList)objects).add(beanName + ":" + propertyName);
+ }
+ else
+ {
+ if (type < 1)
+ return;
+
+ objects = new ArrayList();
+ ((ArrayList)objects).add(beanName + ":" + propertyName);
+ registeredExposedObjects.put(new Integer(type), objects);
+ }
+ }
+
+ public void registerObjects(int type, String beanName, String[] propertyNames)
+ {
+ for (int i = 0; i < propertyNames.length; i++)
+ {
+ registerObject(type, beanName, propertyNames[i]);
+ }
+ }
+
+ public void registerObjects(int[] types, String beanName, String[] propertyNames)
+ {
+ for (int j = 0; j < types.length; j++)
+ {
+ registerObjects(types[j], beanName, propertyNames);
+ }
+ }
+
+ public Integer[] getSupportedTypes() throws IOException
+ {
+ Object[] array = registeredExposedObjects.keySet().toArray();
+ Integer[] types = new Integer[array.length];
+ for (int i = 0; i < array.length; i++)
+ {
+ types[i] = (Integer)array[i];
+ }
+ return types;
+ }
+
+ public String[] listForType(int type) throws IOException
+ {
+ Object list = registeredExposedObjects.get(new Integer(type));
+
+ return (list != null) ? (String[]) ((ArrayList)list).toArray(new String[0]) : new String[0];
+ }
+
+ public String getId()
+ {
+ return ID;
+ }
+
+ public String getType()
+ {
+ return ID;
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/4f6a3052/modules/core/src/flex/management/runtime/AdminConsoleDisplayRegistrarMBean.java
----------------------------------------------------------------------
diff --git a/modules/core/src/flex/management/runtime/AdminConsoleDisplayRegistrarMBean.java b/modules/core/src/flex/management/runtime/AdminConsoleDisplayRegistrarMBean.java
old mode 100755
new mode 100644
index cc12ffb..fd10182
--- a/modules/core/src/flex/management/runtime/AdminConsoleDisplayRegistrarMBean.java
+++ b/modules/core/src/flex/management/runtime/AdminConsoleDisplayRegistrarMBean.java
@@ -1,33 +1,33 @@
-/*
- * 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 flex.management.runtime;
-
-import java.io.IOException;
-
-import flex.management.BaseControlMBean;
-
-/**
- * @exclude
- */
-public interface AdminConsoleDisplayRegistrarMBean extends BaseControlMBean
-{
-
- Integer[] getSupportedTypes() throws IOException;
-
- String[] listForType(int type) throws IOException;
-
-}
+/*
+ * 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 flex.management.runtime;
+
+import java.io.IOException;
+
+import flex.management.BaseControlMBean;
+
+/**
+ * @exclude
+ */
+public interface AdminConsoleDisplayRegistrarMBean extends BaseControlMBean
+{
+
+ Integer[] getSupportedTypes() throws IOException;
+
+ String[] listForType(int type) throws IOException;
+
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/4f6a3052/modules/core/src/flex/management/runtime/AdminConsoleTypes.java
----------------------------------------------------------------------
diff --git a/modules/core/src/flex/management/runtime/AdminConsoleTypes.java b/modules/core/src/flex/management/runtime/AdminConsoleTypes.java
old mode 100755
new mode 100644
index a6a113a..a63085d
--- a/modules/core/src/flex/management/runtime/AdminConsoleTypes.java
+++ b/modules/core/src/flex/management/runtime/AdminConsoleTypes.java
@@ -1,35 +1,35 @@
-/*
- * 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 flex.management.runtime;
-
-/**
- * The interface defines a number of constants for admin console types.
- */
-public interface AdminConsoleTypes
-{
- static final int GENERAL_SERVER = 1;
- static final int GENERAL_POLLABLE = 2;
- static final int GENERAL_OPERATION = 3;
-
- static final int GRAPH_BY_POLL_INTERVAL = 50;
-
- static final int ENDPOINT_SCALAR = 100;
- static final int ENDPOINT_POLLABLE = 101;
-
- static final int DESTINATION_GENERAL = 150;
- static final int DESTINATION_POLLABLE = 151;
-}
+/*
+ * 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 flex.management.runtime;
+
+/**
+ * The interface defines a number of constants for admin console types.
+ */
+public interface AdminConsoleTypes
+{
+ static final int GENERAL_SERVER = 1;
+ static final int GENERAL_POLLABLE = 2;
+ static final int GENERAL_OPERATION = 3;
+
+ static final int GRAPH_BY_POLL_INTERVAL = 50;
+
+ static final int ENDPOINT_SCALAR = 100;
+ static final int ENDPOINT_POLLABLE = 101;
+
+ static final int DESTINATION_GENERAL = 150;
+ static final int DESTINATION_POLLABLE = 151;
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/4f6a3052/modules/core/src/flex/management/runtime/messaging/DestinationControl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/flex/management/runtime/messaging/DestinationControl.java b/modules/core/src/flex/management/runtime/messaging/DestinationControl.java
old mode 100755
new mode 100644
index a83a6f7..ce15acc
--- a/modules/core/src/flex/management/runtime/messaging/DestinationControl.java
+++ b/modules/core/src/flex/management/runtime/messaging/DestinationControl.java
@@ -1,119 +1,119 @@
-/*
- * 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 flex.management.runtime.messaging;
-
-import java.util.Date;
-
-import flex.management.BaseControl;
-import flex.management.runtime.messaging.services.ServiceControl;
-import flex.messaging.Destination;
-import flex.messaging.services.ServiceAdapter;
-
-import javax.management.ObjectName;
-
-/**
- * The <code>DestinationControl</code> class is the MBean implementation for
- * monitoring and managing a <code>Destination</code> at runtime.
- *
- * @author shodgson
- */
-public abstract class DestinationControl extends BaseControl implements
- DestinationControlMBean
-{
- protected Destination destination;
- private ObjectName adapter;
-
- /**
- * Constructs a new <code>DestinationControl</code> instance.
- *
- * @param destination The <code>Destination</code> managed by this MBean.
- * @param parent The parent MBean in the management hierarchy.
- */
- public DestinationControl(Destination destination, BaseControl parent)
- {
- super(parent);
- this.destination = destination;
- }
-
- /*
- * (non-Javadoc)
- * @see flex.management.BaseControlMBean#getId()
- */
- public String getId()
- {
- return destination.getId();
- }
-
- /*
- * (non-Javadoc)
- * @see flex.management.runtime.DestinationControlMBean#getAdapter()
- */
- public ObjectName getAdapter()
- {
- return adapter;
- }
-
- /**
- * Sets the <code>ObjectName</code> for the adapter associated with the managed destination.
- *
- * @param value The <code>ObjectName</code> for the adapter.
- */
- public void setAdapter(ObjectName value)
- {
- adapter = value;
- }
-
- /*
- * (non-Javadoc)
- * @see flex.management.runtime.DestinationControlMBean#isRunning()
- */
- public Boolean isRunning()
- {
- return Boolean.valueOf(destination.isStarted());
- }
-
- /*
- * (non-Javadoc)
- * @see flex.management.runtime.DestinationControlMBean#getStartTimestamp()
- */
- public Date getStartTimestamp()
- {
- return startTimestamp;
- }
-
- /*
- * (non-Javadoc)
- * @see javax.management.MBeanRegistration#preDeregister()
- */
- public void preDeregister() throws Exception
- {
- ServiceControl parent = (ServiceControl)getParentControl();
- parent.removeDestination(getObjectName());
-
- // Unregister adapter of the destination
- ServiceAdapter child = destination.getAdapter();
- if (child.getControl() != null)
- {
- child.getControl().unregister();
- child.setControl(null);
- child.setManaged(false);
- }
-
- super.preDeregister();
- }
-
-}
+/*
+ * 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 flex.management.runtime.messaging;
+
+import java.util.Date;
+
+import flex.management.BaseControl;
+import flex.management.runtime.messaging.services.ServiceControl;
+import flex.messaging.Destination;
+import flex.messaging.services.ServiceAdapter;
+
+import javax.management.ObjectName;
+
+/**
+ * The <code>DestinationControl</code> class is the MBean implementation for
+ * monitoring and managing a <code>Destination</code> at runtime.
+ *
+ * @author shodgson
+ */
+public abstract class DestinationControl extends BaseControl implements
+ DestinationControlMBean
+{
+ protected Destination destination;
+ private ObjectName adapter;
+
+ /**
+ * Constructs a new <code>DestinationControl</code> instance.
+ *
+ * @param destination The <code>Destination</code> managed by this MBean.
+ * @param parent The parent MBean in the management hierarchy.
+ */
+ public DestinationControl(Destination destination, BaseControl parent)
+ {
+ super(parent);
+ this.destination = destination;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see flex.management.BaseControlMBean#getId()
+ */
+ public String getId()
+ {
+ return destination.getId();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see flex.management.runtime.DestinationControlMBean#getAdapter()
+ */
+ public ObjectName getAdapter()
+ {
+ return adapter;
+ }
+
+ /**
+ * Sets the <code>ObjectName</code> for the adapter associated with the managed destination.
+ *
+ * @param value The <code>ObjectName</code> for the adapter.
+ */
+ public void setAdapter(ObjectName value)
+ {
+ adapter = value;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see flex.management.runtime.DestinationControlMBean#isRunning()
+ */
+ public Boolean isRunning()
+ {
+ return Boolean.valueOf(destination.isStarted());
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see flex.management.runtime.DestinationControlMBean#getStartTimestamp()
+ */
+ public Date getStartTimestamp()
+ {
+ return startTimestamp;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see javax.management.MBeanRegistration#preDeregister()
+ */
+ public void preDeregister() throws Exception
+ {
+ ServiceControl parent = (ServiceControl)getParentControl();
+ parent.removeDestination(getObjectName());
+
+ // Unregister adapter of the destination
+ ServiceAdapter child = destination.getAdapter();
+ if (child.getControl() != null)
+ {
+ child.getControl().unregister();
+ child.setControl(null);
+ child.setManaged(false);
+ }
+
+ super.preDeregister();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/4f6a3052/modules/core/src/flex/management/runtime/messaging/DestinationControlMBean.java
----------------------------------------------------------------------
diff --git a/modules/core/src/flex/management/runtime/messaging/DestinationControlMBean.java b/modules/core/src/flex/management/runtime/messaging/DestinationControlMBean.java
old mode 100755
new mode 100644
index acc1399..daea55a
--- a/modules/core/src/flex/management/runtime/messaging/DestinationControlMBean.java
+++ b/modules/core/src/flex/management/runtime/messaging/DestinationControlMBean.java
@@ -1,57 +1,57 @@
-/*
- * 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 flex.management.runtime.messaging;
-
-import flex.management.BaseControlMBean;
-
-import java.io.IOException;
-import java.util.Date;
-
-import javax.management.ObjectName;
-
-/**
- * Defines the runtime monitoring and management interface for managed destinations.
- *
- * @author shodgson
- */
-public interface DestinationControlMBean extends BaseControlMBean
-{
- /**
- * Returns the <code>ObjectName</code> for the adapter associated with this
- * managed destination.
- *
- * @return The <code>ObjectName</code> for the adapter.
- * @throws IOException Throws IOException.
- */
- ObjectName getAdapter() throws IOException;;
-
- /**
- * Returns <code>true</code> if the <code>Destination</code> is running.
- *
- * @return <code>true</code> if the <code>Destination</code> is running.
- * @throws IOException Throws IOException.
- */
- Boolean isRunning() throws IOException;
-
- /**
- * Returns the start timestamp for the <code>Destination</code>.
- *
- * @return The start timestamp for the <code>Destination</code>.
- * @throws IOException Throws IOException.
- */
- Date getStartTimestamp() throws IOException;
-}
+/*
+ * 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 flex.management.runtime.messaging;
+
+import flex.management.BaseControlMBean;
+
+import java.io.IOException;
+import java.util.Date;
+
+import javax.management.ObjectName;
+
+/**
+ * Defines the runtime monitoring and management interface for managed destinations.
+ *
+ * @author shodgson
+ */
+public interface DestinationControlMBean extends BaseControlMBean
+{
+ /**
+ * Returns the <code>ObjectName</code> for the adapter associated with this
+ * managed destination.
+ *
+ * @return The <code>ObjectName</code> for the adapter.
+ * @throws IOException Throws IOException.
+ */
+ ObjectName getAdapter() throws IOException;;
+
+ /**
+ * Returns <code>true</code> if the <code>Destination</code> is running.
+ *
+ * @return <code>true</code> if the <code>Destination</code> is running.
+ * @throws IOException Throws IOException.
+ */
+ Boolean isRunning() throws IOException;
+
+ /**
+ * Returns the start timestamp for the <code>Destination</code>.
+ *
+ * @return The start timestamp for the <code>Destination</code>.
+ * @throws IOException Throws IOException.
+ */
+ Date getStartTimestamp() throws IOException;
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/4f6a3052/modules/core/src/flex/management/runtime/messaging/MessageBrokerControl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/flex/management/runtime/messaging/MessageBrokerControl.java b/modules/core/src/flex/management/runtime/messaging/MessageBrokerControl.java
old mode 100755
new mode 100644
index 6b8c5a5..dab4ff9
--- a/modules/core/src/flex/management/runtime/messaging/MessageBrokerControl.java
+++ b/modules/core/src/flex/management/runtime/messaging/MessageBrokerControl.java
@@ -1,297 +1,297 @@
-/*
- * 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 flex.management.runtime.messaging;
-
-import flex.management.BaseControl;
-import flex.management.runtime.AdminConsoleDisplayRegistrar;
-import flex.management.runtime.AdminConsoleTypes;
-import flex.messaging.MessageBroker;
-import flex.messaging.endpoints.AMFEndpoint;
-import flex.messaging.endpoints.AbstractEndpoint;
-import flex.messaging.endpoints.Endpoint;
-import flex.messaging.endpoints.HTTPEndpoint;
-import flex.messaging.endpoints.StreamingAMFEndpoint;
-import flex.messaging.endpoints.StreamingHTTPEndpoint;
-
-import java.io.IOException;
-import java.util.Date;
-import java.util.List;
-import java.util.ArrayList;
-
-import javax.management.ObjectName;
-
-/**
- * The <code>MessageBrokerControl</code> class is the MBean implemenation for monitoring
- * and managing a <code>MessageBroker</code> at runtime.
- *
- * @author shodgson
- * @author majacobs
- */
-public class MessageBrokerControl extends BaseControl implements MessageBrokerControlMBean
-{
- private static final Object classMutex = new Object();
- private static final String TYPE = "MessageBroker";
- private static int instanceCount = 0;
- private String id;
- private MessageBroker broker;
- private List endpointNames;
- private List amfEndpoints;
- private List httpEndpoints;
- private List enterpriseEndpoints;
- private List streamingAmfEndpoints;
- private List streamingHttpEndpoints;
- private List services;
-
- /**
- * Constructs a new <code>MessageBrokerControl</code> instance, assigning its
- * backing <code>MessageBroker</code>.
- *
- * @param broker The <code>MessageBroker</code> managed by this MBean.
- */
- public MessageBrokerControl(MessageBroker broker)
- {
- super(null);
- this.broker = broker;
- endpointNames = new ArrayList();
- amfEndpoints = new ArrayList();
- httpEndpoints = new ArrayList();
- enterpriseEndpoints = new ArrayList();
- streamingAmfEndpoints = new ArrayList();
- streamingHttpEndpoints = new ArrayList();
- services = new ArrayList();
- synchronized (classMutex)
- {
- id = TYPE + ++instanceCount;
- }
-
- setRegistrar(new AdminConsoleDisplayRegistrar(this));
- }
-
- protected void onRegistrationComplete()
- {
- String name = this.getObjectName().getCanonicalName();
- getRegistrar().registerObject(AdminConsoleTypes.GENERAL_POLLABLE, name, "FlexSessionCount");
- getRegistrar().registerObjects(new int[] {AdminConsoleTypes.GENERAL_POLLABLE, AdminConsoleTypes.GRAPH_BY_POLL_INTERVAL },
- name, new String[] {"AMFThroughput", "HTTPThroughput", "EnterpriseThroughput"});
-
- getRegistrar().registerObject(AdminConsoleTypes.GENERAL_SERVER, name, "MaxFlexSessionsInCurrentHour");
- }
-
- /*
- * (non-Javadoc)
- * @see flex.management.BaseControlMBean#getId()
- */
- public String getId()
- {
- return id;
- }
-
- /*
- * (non-Javadoc)
- * @see flex.management.BaseControlMBean#getType()
- */
- public String getType()
- {
- return TYPE;
- }
-
- /*
- * (non-Javadoc)
- * @see flex.management.runtime.MessageBrokerControlMBean#isRunning()
- */
- public Boolean isRunning()
- {
- return Boolean.valueOf(broker.isStarted());
- }
-
- /*
- * (non-Javadoc)
- * @see flex.management.runtime.MessageBrokerControlMBean#getStartTimestamp()
- */
- public Date getStartTimestamp()
- {
- return startTimestamp;
- }
-
- /*
- * (non-Javadoc)
- * @see flex.management.runtime.MessageBrokerControlMBean#getEndpoints()
- */
- public ObjectName[] getEndpoints() throws IOException
- {
- int size = endpointNames.size();
- ObjectName[] endpointNameObjects = new ObjectName[size];
- for (int i = 0; i < size; ++i)
- {
- endpointNameObjects[i] = (ObjectName)endpointNames.get(i);
- }
- return endpointNameObjects;
- }
-
- /**
- * Adds an <code>Endpoint</code> for an endpoint registered with the backing <code>MessageBroker</code>.
- *
- * @param value The endpoint <code>Endpoint</code>.
- */
- public void addEndpoint(Endpoint value)
- {
- if (value instanceof AMFEndpoint)
- amfEndpoints.add(value);
- else if (value instanceof HTTPEndpoint)
- httpEndpoints.add(value);
- else if (value instanceof StreamingAMFEndpoint)
- streamingAmfEndpoints.add(value);
- else if (value instanceof StreamingHTTPEndpoint)
- streamingHttpEndpoints.add(value);
- else
- enterpriseEndpoints.add(value);
-
- endpointNames.add(value.getControl().getObjectName());
- }
-
- /**
- * Removes an <code>ObjectName</code> for an endpoint registered with the backing <code>MessageBroker</code>.
- *
- * @param value The endpoint <code>ObjectName</code>.
- */
- public void removeEndpoint(ObjectName value)
- {
- endpointNames.remove(value);
- }
-
- /*
- * (non-Javadoc)
- * @see flex.management.runtime.MessageBrokerControlMBean#getServices()
- */
- public ObjectName[] getServices() throws IOException
- {
- int size = services.size();
- ObjectName[] serviceNames = new ObjectName[size];
- for (int i = 0; i < size; ++i)
- {
- serviceNames[i] = (ObjectName)services.get(i);
- }
- return serviceNames;
- }
-
- /**
- * Adds an <code>ObjectName</code> for a service registered with the backing <code>MessageBroker</code>.
- *
- * @param value The service <code>ObjectName</code>.
- */
- public void addService(ObjectName value)
- {
- services.add(value);
- }
-
- /**
- * Removes an <code>ObjectName</code> for a service registered with the backing <code>MessageBroker</code>.
- *
- * @param value The service <code>ObjectName</code>.
- */
- public void removeService(ObjectName value)
- {
- services.remove(value);
- }
-
- /*
- * (non-Javadoc)
- * @see flex.management.runtime.MessageBrokerControlMBean#getFlexSessionCount()
- */
- public Integer getFlexSessionCount()
- {
- return broker.getFlexSessionManager().getFlexSessionCount();
- }
-
- /*
- * (non-Javadoc)
- * @see flex.management.runtime.MessageBrokerControlMBean#getMaxFlexSessionsInCurrentHour()
- */
- public Integer getMaxFlexSessionsInCurrentHour()
- {
- return broker.getFlexSessionManager().getMaxFlexSessionsInCurrentHour();
- }
-
- /* (non-Javadoc)
- * @see flex.management.runtime.messaging.MessageBrokerControlMBean#getRTMPConnectionCount()
- */
- public Integer getEnterpriseConnectionCount() throws IOException
- {
- int connections = 0;
- /*
- for (int i = 0; i < rtmpEndpoints.size(); i++)
- {
- connections += (((RTMPEndpoint)rtmpEndpoints.get(i)).getConnectionCount());
- }
- */
- return new Integer(connections);
- }
-
- /* (non-Javadoc)
- * @see flex.management.runtime.messaging.MessageBrokerControlMBean#getAMFThroughput()
- */
- public Long getAMFThroughput() throws IOException
- {
- return new Long(calculateEndpointThroughput(amfEndpoints));
- }
-
- /* (non-Javadoc)
- * @see flex.management.runtime.messaging.MessageBrokerControlMBean#getHTTPThroughput()
- */
- public Long getHTTPThroughput() throws IOException
- {
- return new Long(calculateEndpointThroughput(httpEndpoints));
- }
-
- /* (non-Javadoc)
- * @see flex.management.runtime.messaging.MessageBrokerControlMBean#getRTMPThroughput()
- */
- public Long getEnterpriseThroughput() throws IOException
- {
- return new Long(calculateEndpointThroughput(enterpriseEndpoints));
- }
-
- /* (non-Javadoc)
- * @see flex.management.runtime.messaging.MessageBrokerControlMBean#getStreamingAMFThroughput()
- */
- public Long getStreamingAMFThroughput() throws IOException
- {
- return new Long(calculateEndpointThroughput(streamingAmfEndpoints));
- }
-
- /* (non-Javadoc)
- * @see flex.management.runtime.messaging.MessageBrokerControlMBean#getStreamingHTTPThroughput()
- */
- public Long getStreamingHTTPThroughput() throws IOException
- {
- return new Long(calculateEndpointThroughput(streamingHttpEndpoints));
- }
-
- private long calculateEndpointThroughput(List endpoints)
- {
- long throughput = 0;
-
- for (int i = 0; i < endpoints.size(); i++)
- {
- // This method shouldn't be used with Lists containing objects that are not AbstractEndpoints
- if (endpoints.get(i) instanceof AbstractEndpoint)
- throughput += ((AbstractEndpoint)endpoints.get(i)).getThroughput();
- }
-
- return throughput;
- }
-}
+/*
+ * 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 flex.management.runtime.messaging;
+
+import flex.management.BaseControl;
+import flex.management.runtime.AdminConsoleDisplayRegistrar;
+import flex.management.runtime.AdminConsoleTypes;
+import flex.messaging.MessageBroker;
+import flex.messaging.endpoints.AMFEndpoint;
+import flex.messaging.endpoints.AbstractEndpoint;
+import flex.messaging.endpoints.Endpoint;
+import flex.messaging.endpoints.HTTPEndpoint;
+import flex.messaging.endpoints.StreamingAMFEndpoint;
+import flex.messaging.endpoints.StreamingHTTPEndpoint;
+
+import java.io.IOException;
+import java.util.Date;
+import java.util.List;
+import java.util.ArrayList;
+
+import javax.management.ObjectName;
+
+/**
+ * The <code>MessageBrokerControl</code> class is the MBean implemenation for monitoring
+ * and managing a <code>MessageBroker</code> at runtime.
+ *
+ * @author shodgson
+ * @author majacobs
+ */
+public class MessageBrokerControl extends BaseControl implements MessageBrokerControlMBean
+{
+ private static final Object classMutex = new Object();
+ private static final String TYPE = "MessageBroker";
+ private static int instanceCount = 0;
+ private String id;
+ private MessageBroker broker;
+ private List endpointNames;
+ private List amfEndpoints;
+ private List httpEndpoints;
+ private List enterpriseEndpoints;
+ private List streamingAmfEndpoints;
+ private List streamingHttpEndpoints;
+ private List services;
+
+ /**
+ * Constructs a new <code>MessageBrokerControl</code> instance, assigning its
+ * backing <code>MessageBroker</code>.
+ *
+ * @param broker The <code>MessageBroker</code> managed by this MBean.
+ */
+ public MessageBrokerControl(MessageBroker broker)
+ {
+ super(null);
+ this.broker = broker;
+ endpointNames = new ArrayList();
+ amfEndpoints = new ArrayList();
+ httpEndpoints = new ArrayList();
+ enterpriseEndpoints = new ArrayList();
+ streamingAmfEndpoints = new ArrayList();
+ streamingHttpEndpoints = new ArrayList();
+ services = new ArrayList();
+ synchronized (classMutex)
+ {
+ id = TYPE + ++instanceCount;
+ }
+
+ setRegistrar(new AdminConsoleDisplayRegistrar(this));
+ }
+
+ protected void onRegistrationComplete()
+ {
+ String name = this.getObjectName().getCanonicalName();
+ getRegistrar().registerObject(AdminConsoleTypes.GENERAL_POLLABLE, name, "FlexSessionCount");
+ getRegistrar().registerObjects(new int[] {AdminConsoleTypes.GENERAL_POLLABLE, AdminConsoleTypes.GRAPH_BY_POLL_INTERVAL },
+ name, new String[] {"AMFThroughput", "HTTPThroughput", "EnterpriseThroughput"});
+
+ getRegistrar().registerObject(AdminConsoleTypes.GENERAL_SERVER, name, "MaxFlexSessionsInCurrentHour");
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see flex.management.BaseControlMBean#getId()
+ */
+ public String getId()
+ {
+ return id;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see flex.management.BaseControlMBean#getType()
+ */
+ public String getType()
+ {
+ return TYPE;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see flex.management.runtime.MessageBrokerControlMBean#isRunning()
+ */
+ public Boolean isRunning()
+ {
+ return Boolean.valueOf(broker.isStarted());
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see flex.management.runtime.MessageBrokerControlMBean#getStartTimestamp()
+ */
+ public Date getStartTimestamp()
+ {
+ return startTimestamp;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see flex.management.runtime.MessageBrokerControlMBean#getEndpoints()
+ */
+ public ObjectName[] getEndpoints() throws IOException
+ {
+ int size = endpointNames.size();
+ ObjectName[] endpointNameObjects = new ObjectName[size];
+ for (int i = 0; i < size; ++i)
+ {
+ endpointNameObjects[i] = (ObjectName)endpointNames.get(i);
+ }
+ return endpointNameObjects;
+ }
+
+ /**
+ * Adds an <code>Endpoint</code> for an endpoint registered with the backing <code>MessageBroker</code>.
+ *
+ * @param value The endpoint <code>Endpoint</code>.
+ */
+ public void addEndpoint(Endpoint value)
+ {
+ if (value instanceof AMFEndpoint)
+ amfEndpoints.add(value);
+ else if (value instanceof HTTPEndpoint)
+ httpEndpoints.add(value);
+ else if (value instanceof StreamingAMFEndpoint)
+ streamingAmfEndpoints.add(value);
+ else if (value instanceof StreamingHTTPEndpoint)
+ streamingHttpEndpoints.add(value);
+ else
+ enterpriseEndpoints.add(value);
+
+ endpointNames.add(value.getControl().getObjectName());
+ }
+
+ /**
+ * Removes an <code>ObjectName</code> for an endpoint registered with the backing <code>MessageBroker</code>.
+ *
+ * @param value The endpoint <code>ObjectName</code>.
+ */
+ public void removeEndpoint(ObjectName value)
+ {
+ endpointNames.remove(value);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see flex.management.runtime.MessageBrokerControlMBean#getServices()
+ */
+ public ObjectName[] getServices() throws IOException
+ {
+ int size = services.size();
+ ObjectName[] serviceNames = new ObjectName[size];
+ for (int i = 0; i < size; ++i)
+ {
+ serviceNames[i] = (ObjectName)services.get(i);
+ }
+ return serviceNames;
+ }
+
+ /**
+ * Adds an <code>ObjectName</code> for a service registered with the backing <code>MessageBroker</code>.
+ *
+ * @param value The service <code>ObjectName</code>.
+ */
+ public void addService(ObjectName value)
+ {
+ services.add(value);
+ }
+
+ /**
+ * Removes an <code>ObjectName</code> for a service registered with the backing <code>MessageBroker</code>.
+ *
+ * @param value The service <code>ObjectName</code>.
+ */
+ public void removeService(ObjectName value)
+ {
+ services.remove(value);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see flex.management.runtime.MessageBrokerControlMBean#getFlexSessionCount()
+ */
+ public Integer getFlexSessionCount()
+ {
+ return broker.getFlexSessionManager().getFlexSessionCount();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see flex.management.runtime.MessageBrokerControlMBean#getMaxFlexSessionsInCurrentHour()
+ */
+ public Integer getMaxFlexSessionsInCurrentHour()
+ {
+ return broker.getFlexSessionManager().getMaxFlexSessionsInCurrentHour();
+ }
+
+ /* (non-Javadoc)
+ * @see flex.management.runtime.messaging.MessageBrokerControlMBean#getRTMPConnectionCount()
+ */
+ public Integer getEnterpriseConnectionCount() throws IOException
+ {
+ int connections = 0;
+ /*
+ for (int i = 0; i < rtmpEndpoints.size(); i++)
+ {
+ connections += (((RTMPEndpoint)rtmpEndpoints.get(i)).getConnectionCount());
+ }
+ */
+ return new Integer(connections);
+ }
+
+ /* (non-Javadoc)
+ * @see flex.management.runtime.messaging.MessageBrokerControlMBean#getAMFThroughput()
+ */
+ public Long getAMFThroughput() throws IOException
+ {
+ return new Long(calculateEndpointThroughput(amfEndpoints));
+ }
+
+ /* (non-Javadoc)
+ * @see flex.management.runtime.messaging.MessageBrokerControlMBean#getHTTPThroughput()
+ */
+ public Long getHTTPThroughput() throws IOException
+ {
+ return new Long(calculateEndpointThroughput(httpEndpoints));
+ }
+
+ /* (non-Javadoc)
+ * @see flex.management.runtime.messaging.MessageBrokerControlMBean#getRTMPThroughput()
+ */
+ public Long getEnterpriseThroughput() throws IOException
+ {
+ return new Long(calculateEndpointThroughput(enterpriseEndpoints));
+ }
+
+ /* (non-Javadoc)
+ * @see flex.management.runtime.messaging.MessageBrokerControlMBean#getStreamingAMFThroughput()
+ */
+ public Long getStreamingAMFThroughput() throws IOException
+ {
+ return new Long(calculateEndpointThroughput(streamingAmfEndpoints));
+ }
+
+ /* (non-Javadoc)
+ * @see flex.management.runtime.messaging.MessageBrokerControlMBean#getStreamingHTTPThroughput()
+ */
+ public Long getStreamingHTTPThroughput() throws IOException
+ {
+ return new Long(calculateEndpointThroughput(streamingHttpEndpoints));
+ }
+
+ private long calculateEndpointThroughput(List endpoints)
+ {
+ long throughput = 0;
+
+ for (int i = 0; i < endpoints.size(); i++)
+ {
+ // This method shouldn't be used with Lists containing objects that are not AbstractEndpoints
+ if (endpoints.get(i) instanceof AbstractEndpoint)
+ throughput += ((AbstractEndpoint)endpoints.get(i)).getThroughput();
+ }
+
+ return throughput;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/4f6a3052/modules/core/src/flex/management/runtime/messaging/MessageBrokerControlMBean.java
----------------------------------------------------------------------
diff --git a/modules/core/src/flex/management/runtime/messaging/MessageBrokerControlMBean.java b/modules/core/src/flex/management/runtime/messaging/MessageBrokerControlMBean.java
old mode 100755
new mode 100644
index a209c4b..3bb02b0
--- a/modules/core/src/flex/management/runtime/messaging/MessageBrokerControlMBean.java
+++ b/modules/core/src/flex/management/runtime/messaging/MessageBrokerControlMBean.java
@@ -1,132 +1,132 @@
-/*
- * 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 flex.management.runtime.messaging;
-
-import flex.management.BaseControlMBean;
-
-import java.io.IOException;
-import java.util.Date;
-import javax.management.ObjectName;
-
-/**
- * Defines the runtime monitoring and management interface for managed <code>MessageBroker</code>s.
- *
- * @author shodgson
- */
-public interface MessageBrokerControlMBean extends BaseControlMBean
-{
- /**
- * Returns <code>true</code> if the <code>MessageBroker</code> is running.
- *
- * @return <code>true</code> if the <code>MessageBroker</code> is running.
- * @throws IOException Throws IOException.
- */
- Boolean isRunning() throws IOException;
-
- /**
- * Returns the start timestamp for the <code>MessageBroker</code>.
- *
- * @return The start timestamp for the <code>MessageBroker</code>.
- * @throws IOException Throws IOException.
- */
- Date getStartTimestamp() throws IOException;
-
- /**
- * Returns the <code>ObjectName</code>s for endpoints that are registered with the
- * managed <code>MessageBroker</code>.
- *
- * @return The <code>ObjectName</code>s for endpoints registered with the managed <code>MessageBroker</code>.
- * @throws IOException Throws IOException.
- */
- ObjectName[] getEndpoints() throws IOException;
-
- /**
- * Returns the <code>ObjectName</code>s for services that are registered with the
- * managed <code>MessageBroker</code>.
- *
- * @return The <code>ObjectName</code>s for services registered with the managed <code>MessageBroker</code>.
- * @throws IOException Throws IOException.
- */
- ObjectName[] getServices() throws IOException;
-
- /**
- * Returns Flex session count for the <code>MessageBroker</code>.
- *
- * @return Flex session count for the <code>MessageBroker</code>.
- * @throws IOException Throws IOException.
- */
- Integer getFlexSessionCount() throws IOException;
-
- /**
- * Returns the maximum concurrent Flex session count for the
- * <code>MessageBroker</code> in the current hour.
- *
- * @return The maximum concurrent Flex session count for the
- * <code>MessageBroker</code> over the course of the last hour.
- * @throws IOException Throws IOException.
- */
- Integer getMaxFlexSessionsInCurrentHour() throws IOException;
-
- /**
- * Returns the number of Enterprise Connections across all
- * Enterprise Endpoints.
- *
- * @return The number of Enterprise Connections
- * @throws IOException Throws IOException.
- */
- Integer getEnterpriseConnectionCount() throws IOException;
-
- /**
- * Returns the total number of bytes passing through all AMF endpoints.
- *
- * @return The total number of bytes passing through all AMF endpoints.
- * @throws IOException Throws IOException.
- */
- Long getAMFThroughput() throws IOException;
-
- /**
- * Returns the total number of bytes passing through all HTTP endpoints.
- *
- * @return The total number of bytes passing through all HTTP endpoints.
- * @throws IOException Throws IOException.
- */
- Long getHTTPThroughput() throws IOException;
-
- /**
- * Returns the total number of bytes passing through all Enterprise endpoints.
- *
- * @return The total number of bytes passing through all Enterprise endpoints.
- * @throws IOException Throws IOException.
- */
- Long getEnterpriseThroughput() throws IOException;
-
- /**
- * Returns the total number of bytes passing through all streaming AMF endpoints.
- *
- * @return The total number of bytes passing through all streaming AMF endpoints.
- * @throws IOException Throws IOException.
- */
- Long getStreamingAMFThroughput() throws IOException;
-
- /**
- * Returns the total number of bytes passing through all streaming HTTP endpoints.
- *
- * @return The total number of bytes passing through all streaming HTTP endpoints.
- * @throws IOException Throws IOException.
- */
- Long getStreamingHTTPThroughput() throws IOException;
-}
+/*
+ * 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 flex.management.runtime.messaging;
+
+import flex.management.BaseControlMBean;
+
+import java.io.IOException;
+import java.util.Date;
+import javax.management.ObjectName;
+
+/**
+ * Defines the runtime monitoring and management interface for managed <code>MessageBroker</code>s.
+ *
+ * @author shodgson
+ */
+public interface MessageBrokerControlMBean extends BaseControlMBean
+{
+ /**
+ * Returns <code>true</code> if the <code>MessageBroker</code> is running.
+ *
+ * @return <code>true</code> if the <code>MessageBroker</code> is running.
+ * @throws IOException Throws IOException.
+ */
+ Boolean isRunning() throws IOException;
+
+ /**
+ * Returns the start timestamp for the <code>MessageBroker</code>.
+ *
+ * @return The start timestamp for the <code>MessageBroker</code>.
+ * @throws IOException Throws IOException.
+ */
+ Date getStartTimestamp() throws IOException;
+
+ /**
+ * Returns the <code>ObjectName</code>s for endpoints that are registered with the
+ * managed <code>MessageBroker</code>.
+ *
+ * @return The <code>ObjectName</code>s for endpoints registered with the managed <code>MessageBroker</code>.
+ * @throws IOException Throws IOException.
+ */
+ ObjectName[] getEndpoints() throws IOException;
+
+ /**
+ * Returns the <code>ObjectName</code>s for services that are registered with the
+ * managed <code>MessageBroker</code>.
+ *
+ * @return The <code>ObjectName</code>s for services registered with the managed <code>MessageBroker</code>.
+ * @throws IOException Throws IOException.
+ */
+ ObjectName[] getServices() throws IOException;
+
+ /**
+ * Returns Flex session count for the <code>MessageBroker</code>.
+ *
+ * @return Flex session count for the <code>MessageBroker</code>.
+ * @throws IOException Throws IOException.
+ */
+ Integer getFlexSessionCount() throws IOException;
+
+ /**
+ * Returns the maximum concurrent Flex session count for the
+ * <code>MessageBroker</code> in the current hour.
+ *
+ * @return The maximum concurrent Flex session count for the
+ * <code>MessageBroker</code> over the course of the last hour.
+ * @throws IOException Throws IOException.
+ */
+ Integer getMaxFlexSessionsInCurrentHour() throws IOException;
+
+ /**
+ * Returns the number of Enterprise Connections across all
+ * Enterprise Endpoints.
+ *
+ * @return The number of Enterprise Connections
+ * @throws IOException Throws IOException.
+ */
+ Integer getEnterpriseConnectionCount() throws IOException;
+
+ /**
+ * Returns the total number of bytes passing through all AMF endpoints.
+ *
+ * @return The total number of bytes passing through all AMF endpoints.
+ * @throws IOException Throws IOException.
+ */
+ Long getAMFThroughput() throws IOException;
+
+ /**
+ * Returns the total number of bytes passing through all HTTP endpoints.
+ *
+ * @return The total number of bytes passing through all HTTP endpoints.
+ * @throws IOException Throws IOException.
+ */
+ Long getHTTPThroughput() throws IOException;
+
+ /**
+ * Returns the total number of bytes passing through all Enterprise endpoints.
+ *
+ * @return The total number of bytes passing through all Enterprise endpoints.
+ * @throws IOException Throws IOException.
+ */
+ Long getEnterpriseThroughput() throws IOException;
+
+ /**
+ * Returns the total number of bytes passing through all streaming AMF endpoints.
+ *
+ * @return The total number of bytes passing through all streaming AMF endpoints.
+ * @throws IOException Throws IOException.
+ */
+ Long getStreamingAMFThroughput() throws IOException;
+
+ /**
+ * Returns the total number of bytes passing through all streaming HTTP endpoints.
+ *
+ * @return The total number of bytes passing through all streaming HTTP endpoints.
+ * @throws IOException Throws IOException.
+ */
+ Long getStreamingHTTPThroughput() throws IOException;
+}