[1/2] activemq-artemis git commit: ARTEMIS-1364: Enable internal sorting in hawtio web console

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[1/2] activemq-artemis git commit: ARTEMIS-1364: Enable internal sorting in hawtio web console

martyntaylor
Repository: activemq-artemis
Updated Branches:
  refs/heads/master e714af7ab -> 4584ac697


ARTEMIS-1364: Enable internal sorting in hawtio web console


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/4abca787
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/4abca787
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/4abca787

Branch: refs/heads/master
Commit: 4abca78785288092cf40d5d314eef8c528977686
Parents: e714af7
Author: saurabhrai <[hidden email]>
Authored: Wed Nov 1 14:07:46 2017 +0530
Committer: Martyn Taylor <[hidden email]>
Committed: Wed Nov 29 08:52:33 2017 +0000

----------------------------------------------------------------------
 .../core/impl/RemotingConnectionImpl.java       |  5 ++
 .../spi/core/protocol/RemotingConnection.java   | 10 ++++
 .../src/main/webapp/plugin/js/addresses.js      | 16 +++--
 .../src/main/webapp/plugin/js/connections.js    | 19 +++---
 .../src/main/webapp/plugin/js/consumers.js      | 34 ++++++-----
 .../src/main/webapp/plugin/js/producers.js      | 28 +++++----
 .../src/main/webapp/plugin/js/queues.js         | 18 +++---
 .../src/main/webapp/plugin/js/sessions.js       | 16 ++---
 .../ActiveMQProtonRemotingConnection.java       |  6 ++
 .../core/protocol/mqtt/MQTTConnection.java      |  6 ++
 .../protocol/openwire/OpenWireConnection.java   |  6 ++
 .../core/protocol/stomp/StompConnection.java    |  7 +++
 .../impl/ActiveMQServerControlImpl.java         |  7 ++-
 .../impl/view/ActiveMQAbstractView.java         |  8 +++
 .../core/management/impl/view/AddressView.java  | 13 ++--
 .../management/impl/view/ConnectionView.java    |  4 +-
 .../core/management/impl/view/ConsumerView.java |  4 +-
 .../core/management/impl/view/ProducerView.java |  2 +-
 .../core/management/impl/view/QueueView.java    |  2 +-
 .../core/management/impl/view/SessionView.java  |  4 +-
 .../view/predicate/AddressFilterPredicate.java  |  6 +-
 .../artemis/core/server/ConsumerInfo.java       | 63 ++++++++++++++++++++
 .../artemis/core/server/ServerConsumer.java     |  6 +-
 .../artemis/core/server/ServerSession.java      |  6 +-
 .../core/server/impl/ServerConsumerImpl.java    | 47 ++++++++++++++-
 .../core/server/impl/ServerSessionImpl.java     | 12 +++-
 .../integration/cli/DummyServerConsumer.java    | 56 +++++++++++++++++
 27 files changed, 326 insertions(+), 85 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4abca787/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/RemotingConnectionImpl.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/RemotingConnectionImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/RemotingConnectionImpl.java
index 480d3dc..17f96fb 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/RemotingConnectionImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/RemotingConnectionImpl.java
@@ -379,6 +379,11 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement
       }
    }
 
+   @Override
+   public String getTransportLocalAddress() {
+      return getTransportConnection().getLocalAddress();
+   }
+
    private void doBufferReceived(final Packet packet) {
       if (ChannelImpl.invokeInterceptors(packet, incomingInterceptors, this) != null) {
          return;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4abca787/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/protocol/RemotingConnection.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/protocol/RemotingConnection.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/protocol/RemotingConnection.java
index 9fc40a3..f2ff5d7 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/protocol/RemotingConnection.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/protocol/RemotingConnection.java
@@ -232,4 +232,14 @@ public interface RemotingConnection extends BufferHandler {
     * @return
     */
    String getClientID();
+
+   /**
+    * Returns a string representation of the local address this connection is connected to.
+    * This is useful when the server is configured at 0.0.0.0 (or multiple IPs).
+    * This will give you the actual IP that's being used.
+    *
+    * @return the local address of transport connection
+    */
+   String getTransportLocalAddress();
+
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4abca787/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/addresses.js
----------------------------------------------------------------------
diff --git a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/addresses.js b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/addresses.js
index fd53554..ea196ac 100644
--- a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/addresses.js
+++ b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/addresses.js
@@ -49,12 +49,14 @@ var ARTEMIS = (function(ARTEMIS) {
             {
                 field: 'routingTypes',
                 displayName: 'Routing Types',
-                width: '*'
+                width: '*',
+                sortable: false
             },
             {
                 field: 'queueCount',
                 displayName: 'Queue Count',
-                width: '*'
+                width: '*',
+                sortable: false
             }
         ];
         $scope.filter = {
@@ -107,8 +109,9 @@ var ARTEMIS = (function(ARTEMIS) {
             pageSize: 100,
             currentPage: 1
         };
-        $scope.sort = {
-            fields: ["ID"],
+        $scope.sortOptions = {
+            fields: ["id"],
+            columns: ["id"],
             directions: ["asc"]
         };
         var refreshed = false;
@@ -148,8 +151,9 @@ var ARTEMIS = (function(ARTEMIS) {
             $scope.loadTable();
         };
         $scope.loadTable = function () {
-            $scope.filter.values.sortColumn = $scope.sort.fields[0];
-            $scope.filter.values.sortBy = $scope.sort.directions[0];
+         $scope.filter.values.sortColumn = $scope.sortOptions.fields[0];
+            $scope.filter.values.sortBy = $scope.sortOptions.directions[0];
+        $scope.filter.values.sortOrder = $scope.sortOptions.directions[0];
             var mbean = getBrokerMBean(jolokia);
             if (mbean) {
                 var filter = JSON.stringify($scope.filter.values);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4abca787/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/connections.js
----------------------------------------------------------------------
diff --git a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/connections.js b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/connections.js
index fcabc42..2329552 100644
--- a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/connections.js
+++ b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/connections.js
@@ -31,7 +31,7 @@ var ARTEMIS = (function(ARTEMIS) {
         var method = 'listConnections(java.lang.String, int, int)';
         var attributes = [
             {
-                field: 'connectionID',
+                field: 'iD',
                 displayName: 'ID',
                 width: '*'
             },
@@ -46,7 +46,7 @@ var ARTEMIS = (function(ARTEMIS) {
                 width: '*'
             },
             {
-                field: 'protocol',
+                field: 'protocolName',
                 displayName: 'Protocol',
                 width: '*'
             },
@@ -55,6 +55,7 @@ var ARTEMIS = (function(ARTEMIS) {
                 displayName: 'Session Count',
                 width: '*',
                 cellTemplate: '<div class="ngCellText"><a ng-click="selectSessions(row)">{{row.entity.sessionCount}}</a></div>',
+                sortable: false
             },
             {
                 field: 'remoteAddress',
@@ -62,7 +63,7 @@ var ARTEMIS = (function(ARTEMIS) {
                 width: '*'
             },
             {
-                field: 'localAddress',
+                field: 'transportLocalAddress',
                 displayName: 'Local Address',
                 width: '*'
             },
@@ -94,7 +95,7 @@ var ARTEMIS = (function(ARTEMIS) {
                 operation: "",
                 value: "",
                 sortOrder: "asc",
-                sortBy: "CONNECTION_ID"
+                sortBy: "iD"
             }
         };
 
@@ -140,8 +141,9 @@ var ARTEMIS = (function(ARTEMIS) {
             pageSize: 100,
             currentPage: 1
         };
-        $scope.sort = {
-            fields: ["ID"],
+        $scope.sortOptions = {
+            fields: ["iD"],
+            columns: ["iD"],
             directions: ["asc"]
         };
         var refreshed = false;
@@ -181,8 +183,9 @@ var ARTEMIS = (function(ARTEMIS) {
             $scope.loadTable();
         };
         $scope.loadTable = function () {
-            $scope.filter.values.sortColumn = $scope.sort.fields[0];
-            $scope.filter.values.sortBy = $scope.sort.directions[0];
+         $scope.filter.values.sortColumn = $scope.sortOptions.fields[0];
+            $scope.filter.values.sortBy = $scope.sortOptions.directions[0];
+        $scope.filter.values.sortOrder = $scope.sortOptions.directions[0];
             var mbean = getBrokerMBean(jolokia);
             if (mbean) {
                 var filter = JSON.stringify($scope.filter.values);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4abca787/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/consumers.js
----------------------------------------------------------------------
diff --git a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/consumers.js b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/consumers.js
index 799683b..ccc17a5 100644
--- a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/consumers.js
+++ b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/consumers.js
@@ -31,31 +31,31 @@ var ARTEMIS = (function(ARTEMIS) {
         var method = 'listConsumers(java.lang.String, int, int)';
         var attributes = [
             {
-                field: 'id',
+                field: 'sequentialID',
                 displayName: 'ID',
                 width: '*'
             },
             {
-                field: 'session',
+                field: 'sessionName',
                 displayName: 'Session',
                 width: '*',
-                cellTemplate: '<div class="ngCellText"><a ng-click="selectSession(row)">{{row.entity.session}}</a></div>'
+                cellTemplate: '<div class="ngCellText"><a ng-click="selectSession(row)">{{row.entity.sessionName}}</a></div>'
             },
             {
-                field: 'clientID',
+                field: 'connectionClientID',
                 displayName: 'Client ID',
                 width: '*'
             },
             {
-                field: 'protocol',
+                field: 'connectionProtocolName',
                 displayName: 'Protocol',
                 width: '*'
             },
             {
-                field: 'queue',
+                field: 'queueName',
                 displayName: 'Queue',
                 width: '*',
-                cellTemplate: '<div class="ngCellText"><a ng-click="selectQueue(row)">{{row.entity.queue}}</a></div>'
+                cellTemplate: '<div class="ngCellText"><a ng-click="selectQueue(row)">{{row.entity.queueName}}</a></div>'
             },
             {
                 field: 'queueType',
@@ -63,18 +63,18 @@ var ARTEMIS = (function(ARTEMIS) {
                 width: '*'
             },
             {
-                field: 'address',
+                field: 'queueAddress',
                 displayName: 'Address',
                 width: '*',
-                cellTemplate: '<div class="ngCellText"><a ng-click="selectAddress(row)">{{row.entity.address}}</a></div>'
+                cellTemplate: '<div class="ngCellText"><a ng-click="selectAddress(row)">{{row.entity.queueAddress}}</a></div>'
             },
             {
-                field: 'remoteAddress',
+                field: 'connectionRemoteAddress',
                 displayName: 'Remote Address',
                 width: '*'
             },
             {
-                field: 'localAddress',
+                field: 'connectionLocalAddress',
                 displayName: 'Local Address',
                 width: '*'
             },
@@ -105,7 +105,7 @@ var ARTEMIS = (function(ARTEMIS) {
                 operation: "",
                 value: "",
                 sortOrder: "asc",
-                sortBy: "ID"
+                sortBy: "sequentialID"
             }
         };
 
@@ -165,8 +165,9 @@ var ARTEMIS = (function(ARTEMIS) {
             pageSize: 100,
             currentPage: 1
         };
-        $scope.sort = {
-            fields: ["ID"],
+        $scope.sortOptions = {
+            fields: ["sequentialID"],
+            columns: ["sequentialID"],
             directions: ["asc"]
         };
         var refreshed = false;
@@ -206,8 +207,9 @@ var ARTEMIS = (function(ARTEMIS) {
             $scope.loadTable();
         };
         $scope.loadTable = function () {
-            $scope.filter.values.sortColumn = $scope.sort.fields[0];
-            $scope.filter.values.sortBy = $scope.sort.directions[0];
+         $scope.filter.values.sortColumn = $scope.sortOptions.fields[0];
+            $scope.filter.values.sortBy = $scope.sortOptions.directions[0];
+        $scope.filter.values.sortOrder = $scope.sortOptions.directions[0];
             var mbean = getBrokerMBean(jolokia);
             if (mbean) {
                 var filter = JSON.stringify($scope.filter.values);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4abca787/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/producers.js
----------------------------------------------------------------------
diff --git a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/producers.js b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/producers.js
index c863268..4f3a316 100644
--- a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/producers.js
+++ b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/producers.js
@@ -31,7 +31,7 @@ var ARTEMIS = (function(ARTEMIS) {
         var method = 'listProducers(java.lang.String, int, int)';
         var attributes = [
             {
-                field: 'id',
+                field: 'iD',
                 displayName: 'ID',
                 width: '*'
             },
@@ -39,22 +39,26 @@ var ARTEMIS = (function(ARTEMIS) {
                 field: 'session',
                 displayName: 'Session',
                 width: '*',
+                sortable: false,
                 cellTemplate: '<div class="ngCellText"><a ng-click="selectSession(row)">{{row.entity.session}}</a></div>'
             },
             {
                 field: 'clientID',
                 displayName: 'Client ID',
+                sortable: false,
                 width: '*'
             },
             {
                 field: 'protocol',
                 displayName: 'Protocol',
-                width: '*'
+                width: '*',
+                sortable: false
             },
             {
                 field: 'user',
                 displayName: 'User',
-                width: '*'
+                width: '*',
+                sortable: false
             },
             {
                 field: 'address',
@@ -65,12 +69,14 @@ var ARTEMIS = (function(ARTEMIS) {
             {
                 field: 'remoteAddress',
                 displayName: 'Remote Address',
-                width: '*'
+                width: '*',
+                sortable: false
             },
             {
                 field: 'localAddress',
                 displayName: 'Local Address',
-                width: '*'
+                width: '*',
+                sortable: false
             }
         ];
         $scope.filter = {
@@ -93,7 +99,7 @@ var ARTEMIS = (function(ARTEMIS) {
                 operation: "",
                 value: "",
                 sortOrder: "asc",
-                sortBy: "ID"
+                sortBy: "iD"
             }
         };
 
@@ -129,8 +135,9 @@ var ARTEMIS = (function(ARTEMIS) {
             pageSize: 100,
             currentPage: 1
         };
-        $scope.sort = {
-            fields: ["ID"],
+        $scope.sortOptions = {
+            fields: ["iD"],
+            columns: ["iD"],
             directions: ["asc"]
         };
         var refreshed = false;
@@ -170,8 +177,9 @@ var ARTEMIS = (function(ARTEMIS) {
             $scope.loadTable();
         };
         $scope.loadTable = function () {
-            $scope.filter.values.sortColumn = $scope.sort.fields[0];
-            $scope.filter.values.sortBy = $scope.sort.directions[0];
+         $scope.filter.values.sortColumn = $scope.sortOptions.fields[0];
+            $scope.filter.values.sortBy = $scope.sortOptions.directions[0];
+        $scope.filter.values.sortOrder = $scope.sortOptions.directions[0];
             var mbean = getBrokerMBean(jolokia);
             if (mbean) {
                 var filter = JSON.stringify($scope.filter.values);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4abca787/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/queues.js
----------------------------------------------------------------------
diff --git a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/queues.js b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/queues.js
index 9bb9e5e..7cd22ec 100644
--- a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/queues.js
+++ b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/queues.js
@@ -37,7 +37,7 @@ var ARTEMIS = (function(ARTEMIS) {
                 cellTemplate: '<div class="ngCellText"><a ng-click="navigateToQueueAtts(row)">attributes</a>&nbsp;<a ng-click="navigateToQueueOps(row)">operations</a></div>'
             },
             {
-                field: 'id',
+                field: 'iD',
                 displayName: 'ID',
                 width: '*'
             },
@@ -178,7 +178,7 @@ var ARTEMIS = (function(ARTEMIS) {
                 operation: "",
                 value: "",
                 sortOrder: "asc",
-                sortBy: "ID"
+                sortBy: "iD"
             }
         };
 
@@ -209,10 +209,11 @@ var ARTEMIS = (function(ARTEMIS) {
             pageSize: 100,
             currentPage: 1
         };
-        $scope.sort = {
-            fields: ["ID"],
-            directions: ["asc"]
-        };
+        $scope.sortOptions = {
+                fields: ["iD"],
+                columns: ["iD"],
+                directions: ["asc"]
+            };
         var refreshed = false;
 
         $scope.gridOptions = {
@@ -250,8 +251,9 @@ var ARTEMIS = (function(ARTEMIS) {
             $scope.loadTable();
         };
         $scope.loadTable = function () {
-            $scope.filter.values.sortColumn = $scope.sort.fields[0];
-            $scope.filter.values.sortBy = $scope.sort.directions[0];
+         $scope.filter.values.sortColumn = $scope.sortOptions.fields[0];
+            $scope.filter.values.sortBy = $scope.sortOptions.directions[0];
+        $scope.filter.values.sortOrder = $scope.sortOptions.directions[0];
             var mbean = getBrokerMBean(jolokia);
             if (mbean) {
                 var filter = JSON.stringify($scope.filter.values);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4abca787/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/sessions.js
----------------------------------------------------------------------
diff --git a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/sessions.js b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/sessions.js
index 5cd96fb..14b84bf 100644
--- a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/sessions.js
+++ b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/sessions.js
@@ -31,7 +31,7 @@ var ARTEMIS = (function(ARTEMIS) {
         var method = 'listSessions(java.lang.String, int, int)';
         var attributes = [
             {
-                field: 'id',
+                field: 'name',
                 displayName: 'ID',
                 width: '*'
             },
@@ -42,7 +42,7 @@ var ARTEMIS = (function(ARTEMIS) {
                 cellTemplate: '<div class="ngCellText"><a ng-click="selectConnection(row)">{{row.entity.connectionID}}</a></div>'
             },
             {
-                field: 'user',
+                field: 'username',
                 displayName: 'User',
                 width: '*'
             },
@@ -86,7 +86,7 @@ var ARTEMIS = (function(ARTEMIS) {
                 operation: "",
                 value: "",
                 sortOrder: "asc",
-                sortBy: "ID"
+                sortBy: "name"
             }
         };
         // Configure Parent/Child click through relationships
@@ -160,8 +160,9 @@ var ARTEMIS = (function(ARTEMIS) {
             pageSize: 100,
             currentPage: 1
         };
-        $scope.sort = {
-            fields: ["ID"],
+        $scope.sortOptions = {
+            fields: ["name"],
+            columns: ["name"],
             directions: ["asc"]
         };
         var refreshed = false;
@@ -201,8 +202,9 @@ var ARTEMIS = (function(ARTEMIS) {
             $scope.loadTable();
         };
         $scope.loadTable = function () {
-            $scope.filter.values.sortColumn = $scope.sort.fields[0];
-            $scope.filter.values.sortBy = $scope.sort.directions[0];
+         $scope.filter.values.sortColumn = $scope.sortOptions.fields[0];
+            $scope.filter.values.sortBy = $scope.sortOptions.directions[0];
+        $scope.filter.values.sortOrder = $scope.sortOptions.directions[0];
             var mbean = getBrokerMBean(jolokia);
             if (mbean) {
                 var filter = JSON.stringify($scope.filter.values);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4abca787/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/ActiveMQProtonRemotingConnection.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/ActiveMQProtonRemotingConnection.java b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/ActiveMQProtonRemotingConnection.java
index fb6ca0a..79144d1 100644
--- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/ActiveMQProtonRemotingConnection.java
+++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/ActiveMQProtonRemotingConnection.java
@@ -179,4 +179,10 @@ public class ActiveMQProtonRemotingConnection extends AbstractRemotingConnection
    public void open() {
       amqpConnection.open();
    }
+
+   @Override
+   public String getTransportLocalAddress() {
+      return getTransportConnection().getLocalAddress();
+   }
+
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4abca787/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTConnection.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTConnection.java b/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTConnection.java
index 94bf17c..eb3b4b1 100644
--- a/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTConnection.java
+++ b/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTConnection.java
@@ -266,4 +266,10 @@ public class MQTTConnection implements RemotingConnection {
    public String getClientID() {
       return clientID;
    }
+
+   @Override
+   public String getTransportLocalAddress() {
+      return getTransportConnection().getLocalAddress();
+   }
+
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4abca787/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java
index 19d158d..a043108 100644
--- a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java
+++ b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java
@@ -1634,4 +1634,10 @@ public class OpenWireConnection extends AbstractRemotingConnection implements Se
    public String getClientID() {
       return context.getClientId();
    }
+
+   @Override
+   public String getTransportLocalAddress() {
+      return getTransportConnection().getLocalAddress();
+   }
+
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4abca787/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompConnection.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompConnection.java b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompConnection.java
index 96859bc..6f7181e 100644
--- a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompConnection.java
+++ b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompConnection.java
@@ -798,4 +798,11 @@ public final class StompConnection implements RemotingConnection {
    public String getProtocolName() {
       return StompProtocolManagerFactory.STOMP_PROTOCOL_NAME;
    }
+
+   @Override
+   public String getTransportLocalAddress() {
+      // TODO Auto-generated method stub
+      return getTransportConnection().getLocalAddress();
+   }
+
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4abca787/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
index a235a53..753d01b 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
@@ -1733,12 +1733,15 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active
    @Override
    public String listAddresses(String options, int page, int pageSize) throws Exception {
       checkStarted();
-
       clearIO();
       try {
          final Set<SimpleString> addresses = server.getPostOffice().getAddresses();
+         List<AddressInfo> addressInfo = new ArrayList<>();
+         for (SimpleString address:addresses) {
+            addressInfo.add(server.getPostOffice().getAddressInfo(address));
+         }
          AddressView view = new AddressView(server);
-         view.setCollection(addresses);
+         view.setCollection(addressInfo);
          view.setOptions(options);
          return view.getResultsAsJson(page, pageSize);
       } finally {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4abca787/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/ActiveMQAbstractView.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/ActiveMQAbstractView.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/ActiveMQAbstractView.java
index 9608d86..f4e44f7 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/ActiveMQAbstractView.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/ActiveMQAbstractView.java
@@ -39,6 +39,10 @@ public abstract class ActiveMQAbstractView<T> {
 
    private static final String FILTER_VALUE = "value";
 
+   private static final String SORT_ORDER = "sortOrder";
+
+   private static final String SORT_COLUMN = "sortColumn";
+
    protected Collection<T> collection;
 
    protected ActiveMQFilterPredicate<T> predicate;
@@ -146,6 +150,10 @@ public abstract class ActiveMQAbstractView<T> {
          predicate.setField(json.getString(FILTER_FIELD));
          predicate.setOperation(json.getString(FILTER_OPERATION));
          predicate.setValue(json.getString(FILTER_VALUE));
+         if (json.containsKey(SORT_COLUMN) && json.containsKey(SORT_ORDER)) {
+            this.sortColumn = json.getString(SORT_COLUMN);
+            this.sortOrder = json.getString(SORT_ORDER);
+         }
       }
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4abca787/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/AddressView.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/AddressView.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/AddressView.java
index 3947c0c..ea24e78 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/AddressView.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/AddressView.java
@@ -17,16 +17,14 @@
 package org.apache.activemq.artemis.core.management.impl.view;
 
 import javax.json.JsonObjectBuilder;
-
-import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.core.management.impl.view.predicate.AddressFilterPredicate;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.core.server.impl.AddressInfo;
 import org.apache.activemq.artemis.utils.JsonLoader;
 
-public class AddressView extends ActiveMQAbstractView<SimpleString> {
+public class AddressView extends ActiveMQAbstractView<AddressInfo> {
 
-   private static final String defaultSortColumn = "creationTime";
+   private static final String defaultSortColumn = "id";
 
    private final ActiveMQServer server;
 
@@ -42,14 +40,11 @@ public class AddressView extends ActiveMQAbstractView<SimpleString> {
    }
 
    @Override
-   public JsonObjectBuilder toJson(SimpleString addressName) {
-
-      AddressInfo address = server.getAddressInfo(addressName);
-      // the address could have been removed since the list was created
-      // if it is not there, just ignore.
+   public JsonObjectBuilder toJson(AddressInfo address) {
       if (address == null) {
          return null;
       }
+
       JsonObjectBuilder obj = JsonLoader.createObjectBuilder().add("id", toString(address.getId())).add("name", toString(address.getName())).add("routingTypes", toString(address.getRoutingTypes()));
 
       try {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4abca787/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/ConnectionView.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/ConnectionView.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/ConnectionView.java
index 32eedff..ac7c4a4 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/ConnectionView.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/ConnectionView.java
@@ -31,7 +31,7 @@ import org.apache.activemq.artemis.utils.StringUtil;
 
 public class ConnectionView extends ActiveMQAbstractView<RemotingConnection> {
 
-   private static final String defaultSortColumn = "creationTime";
+   private static final String defaultSortColumn = "iD";
 
    private final ActiveMQServer server;
 
@@ -57,7 +57,7 @@ public class ConnectionView extends ActiveMQAbstractView<RemotingConnection> {
          users.add(username);
       }
 
-      return JsonLoader.createObjectBuilder().add("connectionID", toString(connection.getID())).add("remoteAddress", toString(connection.getRemoteAddress())).add("users", StringUtil.joinStringList(users, ",")).add("creationTime", new Date(connection.getCreationTime()).toString()).add("implementation", toString(toString(connection.getClass().getSimpleName()))).add("protocol", toString(connection.getProtocolName())).add("clientID", toString(connection.getClientID())).add("localAddress", toString(connection.getTransportConnection().getLocalAddress())).add("sessionCount", server.getSessions(connection.getID().toString()).size());
+      return JsonLoader.createObjectBuilder().add("iD", toString(connection.getID())).add("remoteAddress", toString(connection.getRemoteAddress())).add("users", StringUtil.joinStringList(users, ",")).add("creationTime", new Date(connection.getCreationTime()).toString()).add("implementation", toString(toString(connection.getClass().getSimpleName()))).add("protocolName", toString(connection.getProtocolName())).add("clientID", toString(connection.getClientID())).add("transportLocalAddress", toString(connection.getTransportLocalAddress())).add("sessionCount", server.getSessions(connection.getID().toString()).size());
    }
 
    @Override

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4abca787/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/ConsumerView.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/ConsumerView.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/ConsumerView.java
index fcb7f5e..a54e40b 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/ConsumerView.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/ConsumerView.java
@@ -27,7 +27,7 @@ import org.apache.activemq.artemis.utils.JsonLoader;
 
 public class ConsumerView extends ActiveMQAbstractView<ServerConsumer> {
 
-   private static final String defaultSortColumn = "creationTime";
+   private static final String defaultSortColumn = "sequentialID";
 
    private final ActiveMQServer server;
 
@@ -45,7 +45,7 @@ public class ConsumerView extends ActiveMQAbstractView<ServerConsumer> {
    @Override
    public JsonObjectBuilder toJson(ServerConsumer consumer) {
       ServerSession session = server.getSessionByID(consumer.getSessionID());
-      JsonObjectBuilder obj = JsonLoader.createObjectBuilder().add("id", toString(consumer.sequentialID())).add("session", toString(session.getName())).add("clientID", toString(session.getRemotingConnection().getClientID())).add("user", toString(session.getUsername())).add("protocol", toString(session.getRemotingConnection().getProtocolName())).add("queue", toString(consumer.getQueue().getName())).add("queueType", toString(consumer.getQueue().getRoutingType()).toLowerCase()).add("address", toString(consumer.getQueue().getAddress().toString())).add("localAddress", toString(session.getRemotingConnection().getTransportConnection().getLocalAddress())).add("remoteAddress", toString(session.getRemotingConnection().getTransportConnection().getRemoteAddress())).add("creationTime", new Date(consumer.getCreationTime()).toString());
+      JsonObjectBuilder obj = JsonLoader.createObjectBuilder().add("sequentialID", toString(consumer.getSequentialID())).add("sessionName", toString(consumer.getSessionName())).add("connectionClientID", toString(consumer.getConnectionClientID())).add("user", toString(session.getUsername())).add("connectionProtocolName", toString(consumer.getConnectionProtocolName())).add("queueName", toString(consumer.getQueueName())).add("queueType", toString(consumer.getQueueType()).toLowerCase()).add("queueAddress", toString(consumer.getQueueAddress().toString())).add("connectionLocalAddress", toString(consumer.getConnectionLocalAddress())).add("connectionRemoteAddress", toString(consumer.getConnectionRemoteAddress())).add("creationTime", new Date(consumer.getCreationTime()).toString());
       return obj;
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4abca787/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/ProducerView.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/ProducerView.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/ProducerView.java
index 63c5e88..9787229 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/ProducerView.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/ProducerView.java
@@ -44,7 +44,7 @@ public class ProducerView extends ActiveMQAbstractView<ServerProducer> {
    @Override
    public JsonObjectBuilder toJson(ServerProducer producer) {
       ServerSession session = server.getSessionByID(producer.getSessionID());
-      JsonObjectBuilder obj = JsonLoader.createObjectBuilder().add("id", toString(producer.getID())).add("session", toString(session.getName())).add("clientID", toString(session.getRemotingConnection().getClientID())).add("user", toString(session.getUsername())).add("protocol", toString(session.getRemotingConnection().getProtocolName())).add("address", toString(producer.getAddress() != null ? producer.getAddress() : session.getDefaultAddress())).add("localAddress", toString(session.getRemotingConnection().getTransportConnection().getLocalAddress())).add("remoteAddress", toString(session.getRemotingConnection().getTransportConnection().getRemoteAddress())).add("creationTime", toString(producer.getCreationTime()));
+      JsonObjectBuilder obj = JsonLoader.createObjectBuilder().add("iD", toString(producer.getID())).add("session", toString(session.getName())).add("clientID", toString(session.getRemotingConnection().getClientID())).add("user", toString(session.getUsername())).add("protocol", toString(session.getRemotingConnection().getProtocolName())).add("address", toString(producer.getAddress() != null ? producer.getAddress() : session.getDefaultAddress())).add("localAddress", toString(session.getRemotingConnection().getTransportConnection().getLocalAddress())).add("remoteAddress", toString(session.getRemotingConnection().getTransportConnection().getRemoteAddress())).add("creationTime", toString(producer.getCreationTime()));
       return obj;
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4abca787/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/QueueView.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/QueueView.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/QueueView.java
index 3668680..cb80cc9 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/QueueView.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/QueueView.java
@@ -45,7 +45,7 @@ public class QueueView extends ActiveMQAbstractView<QueueControl> {
    @Override
    public JsonObjectBuilder toJson(QueueControl queue) {
       Queue q = server.locateQueue(new SimpleString(queue.getName()));
-      JsonObjectBuilder obj = JsonLoader.createObjectBuilder().add("id", toString(queue.getID())).add("name", toString(queue.getName())).add("address", toString(queue.getAddress())).add("filter", toString(queue.getFilter())).add("rate", toString(q.getRate())).add("durable", toString(queue.isDurable())).add("paused", toString(q.isPaused())).add("temporary", toString(queue.isTemporary())).add("purgeOnNoConsumers", toString(queue.isPurgeOnNoConsumers())).add("consumerCount", toString(queue.getConsumerCount())).add("maxConsumers", toString(queue.getMaxConsumers())).add("autoCreated", toString(q.isAutoCreated())).add("user", toString(q.getUser())).add("routingType", toString(queue.getRoutingType())).add("messagesAdded", toString(queue.getMessagesAdded())).add("messageCount", toString(queue.getMessageCount())).add("messagesAcked", toString(queue.getMessagesAcknowledged())).add("deliveringCount", toString(queue.getDeliveringCount())).add("messagesKilled", toString(queue.getMessagesKilled()
 )).add("deliverDeliver", toString(q.isDirectDeliver()));
+      JsonObjectBuilder obj = JsonLoader.createObjectBuilder().add("iD", toString(queue.getID())).add("name", toString(queue.getName())).add("address", toString(queue.getAddress())).add("filter", toString(queue.getFilter())).add("rate", toString(q.getRate())).add("durable", toString(queue.isDurable())).add("paused", toString(q.isPaused())).add("temporary", toString(queue.isTemporary())).add("purgeOnNoConsumers", toString(queue.isPurgeOnNoConsumers())).add("consumerCount", toString(queue.getConsumerCount())).add("maxConsumers", toString(queue.getMaxConsumers())).add("autoCreated", toString(q.isAutoCreated())).add("user", toString(q.getUser())).add("routingType", toString(queue.getRoutingType())).add("messagesAdded", toString(queue.getMessagesAdded())).add("messageCount", toString(queue.getMessageCount())).add("messagesAcked", toString(queue.getMessagesAcknowledged())).add("deliveringCount", toString(queue.getDeliveringCount())).add("messagesKilled", toString(queue.getMessagesKilled()
 )).add("deliverDeliver", toString(q.isDirectDeliver()));
       return obj;
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4abca787/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/SessionView.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/SessionView.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/SessionView.java
index 30b5c69..c294993 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/SessionView.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/SessionView.java
@@ -25,7 +25,7 @@ import org.apache.activemq.artemis.utils.JsonLoader;
 
 public class SessionView extends ActiveMQAbstractView<ServerSession> {
 
-   private static final String defaultSortColumn = "creationTime";
+   private static final String defaultSortColumn = "name";
 
    public SessionView() {
       super();
@@ -39,7 +39,7 @@ public class SessionView extends ActiveMQAbstractView<ServerSession> {
 
    @Override
    public JsonObjectBuilder toJson(ServerSession session) {
-      JsonObjectBuilder obj = JsonLoader.createObjectBuilder().add("id", toString(session.getName())).add("user", toString(session.getUsername())).add("creationTime", new Date(session.getCreationTime()).toString()).add("consumerCount", session.getServerConsumers().size()).add("producerCount", session.getServerProducers().size()).add("connectionID", session.getConnectionID().toString());
+      JsonObjectBuilder obj = JsonLoader.createObjectBuilder().add("name", toString(session.getName())).add("username", toString(session.getUsername())).add("creationTime", new Date(session.getCreationTime()).toString()).add("consumerCount", session.getConsumerCount()).add("producerCount", session.getProducerCount()).add("connectionID", session.getConnectionID().toString());
       return obj;
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4abca787/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/predicate/AddressFilterPredicate.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/predicate/AddressFilterPredicate.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/predicate/AddressFilterPredicate.java
index 76e7c71..54081f4 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/predicate/AddressFilterPredicate.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/predicate/AddressFilterPredicate.java
@@ -16,11 +16,10 @@
  */
 package org.apache.activemq.artemis.core.management.impl.view.predicate;
 
-import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.core.server.impl.AddressInfo;
 
-public class AddressFilterPredicate extends ActiveMQFilterPredicate<SimpleString> {
+public class AddressFilterPredicate extends ActiveMQFilterPredicate<AddressInfo> {
 
    enum Field {
       ID, NAME, ROUTING_TYPES, PRODUCER_ID, QUEUE_COUNT
@@ -36,8 +35,7 @@ public class AddressFilterPredicate extends ActiveMQFilterPredicate<SimpleString
    }
 
    @Override
-   public boolean apply(SimpleString addressName) {
-      AddressInfo address = server.getAddressInfo(addressName);
+   public boolean apply(AddressInfo address) {
       if (f == null)
          return true;
       try {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4abca787/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ConsumerInfo.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ConsumerInfo.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ConsumerInfo.java
new file mode 100644
index 0000000..e2b8f2d
--- /dev/null
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ConsumerInfo.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.artemis.core.server;
+
+import org.apache.activemq.artemis.api.core.RoutingType;
+import org.apache.activemq.artemis.api.core.SimpleString;
+
+public interface ConsumerInfo {
+
+   /** an unique sequential ID for this consumer */
+   long getSequentialID();
+
+   /** @return name of the queue that is being consumed */
+   SimpleString getQueueName();
+
+   /** @return name of the queue that is being consumed */
+   RoutingType getQueueType();
+
+   /** @return name of the queue that is being consumed */
+   SimpleString getQueueAddress();
+
+   String getSessionName();
+
+   String getConnectionClientID();
+
+   /**
+    * Returns the name of the protocol for this Remoting Connection
+    * @return the name of protocol
+    */
+   String getConnectionProtocolName();
+
+   /**
+    * Returns a string representation of the local address this connection is
+    * connected to. This is useful when the server is configured at 0.0.0.0 (or
+    * multiple IPs). This will give you the actual IP that's being used.
+    *
+    * @return the local address
+    */
+   String getConnectionLocalAddress();
+
+   /**
+    * Returns a string representation of the remote address this connection is
+    * connected to.
+    *
+    * @return the remote address
+    */
+   String getConnectionRemoteAddress();
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4abca787/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ServerConsumer.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ServerConsumer.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ServerConsumer.java
index 2fd5a1e..eb05563 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ServerConsumer.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ServerConsumer.java
@@ -23,7 +23,7 @@ import org.apache.activemq.artemis.core.transaction.Transaction;
 /**
  * A ServerConsumer
  */
-public interface ServerConsumer extends Consumer {
+public interface ServerConsumer extends Consumer, ConsumerInfo {
 
    void setlowConsumerDetection(SlowConsumerDetectionListener listener);
 
@@ -107,6 +107,4 @@ public interface ServerConsumer extends Consumer {
    String getSessionID();
 
    void promptDelivery();
-}
-
-
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4abca787/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ServerSession.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ServerSession.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ServerSession.java
index 10de4dc..32e35c1 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ServerSession.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ServerSession.java
@@ -312,4 +312,8 @@ public interface ServerSession extends SecurityAuth {
    Map<String, ServerProducer> getServerProducers();
 
    String getDefaultAddress();
-}
+
+   int getConsumerCount();
+
+   int getProducerCount();
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4abca787/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerConsumerImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerConsumerImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerConsumerImpl.java
index 704e563..8e64a21 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerConsumerImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerConsumerImpl.java
@@ -1387,4 +1387,49 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener {
          return b;
       }
    }
-}
+
+   @Override
+   public long getSequentialID() {
+      return sequentialID;
+   }
+
+   @Override
+   public SimpleString getQueueName() {
+      return getQueue().getName();
+   }
+
+   @Override
+   public RoutingType getQueueType() {
+      return getQueue().getRoutingType();
+   }
+
+   @Override
+   public SimpleString getQueueAddress() {
+      return getQueue().getAddress();
+   }
+
+   @Override
+   public String getSessionName() {
+      return this.session.getName();
+   }
+
+   @Override
+   public String getConnectionClientID() {
+      return this.session.getRemotingConnection().getClientID();
+   }
+
+   @Override
+   public String getConnectionProtocolName() {
+      return this.session.getRemotingConnection().getProtocolName();
+   }
+
+   @Override
+   public String getConnectionLocalAddress() {
+      return this.session.getRemotingConnection().getTransportConnection().getLocalAddress();
+   }
+
+   @Override
+   public String getConnectionRemoteAddress() {
+      return this.session.getRemotingConnection().getTransportConnection().getRemoteAddress();
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4abca787/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java
index dacc6bf..ad59acb 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java
@@ -1802,4 +1802,14 @@ public class ServerSessionImpl implements ServerSession, FailureListener {
    public String getDefaultAddress() {
       return defaultAddress != null ? defaultAddress.toString() : null;
    }
-}
+
+   @Override
+   public int getConsumerCount() {
+      return getServerConsumers().size();
+   }
+
+   @Override
+   public int getProducerCount() {
+      return getServerProducers().size();
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4abca787/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cli/DummyServerConsumer.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cli/DummyServerConsumer.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cli/DummyServerConsumer.java
index 968c31b..dcf6d25 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cli/DummyServerConsumer.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cli/DummyServerConsumer.java
@@ -18,6 +18,8 @@ package org.apache.activemq.artemis.tests.integration.cli;
 
 import java.util.List;
 
+import org.apache.activemq.artemis.api.core.RoutingType;
+import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.core.filter.Filter;
 import org.apache.activemq.artemis.core.server.HandleStatus;
 import org.apache.activemq.artemis.core.server.MessageReference;
@@ -211,4 +213,58 @@ public class DummyServerConsumer implements ServerConsumer {
    public void disconnect() {
 
    }
+
+   @Override
+   public long getSequentialID() {
+      // TODO Auto-generated method stub
+      return 0;
+   }
+
+   @Override
+   public SimpleString getQueueName() {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   @Override
+   public RoutingType getQueueType() {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   @Override
+   public SimpleString getQueueAddress() {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   @Override
+   public String getSessionName() {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   @Override
+   public String getConnectionClientID() {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   @Override
+   public String getConnectionProtocolName() {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   @Override
+   public String getConnectionLocalAddress() {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   @Override
+   public String getConnectionRemoteAddress() {
+      // TODO Auto-generated method stub
+      return null;
+   }
 }

Reply | Threaded
Open this post in threaded view
|

[2/2] activemq-artemis git commit: This closes #1628

martyntaylor
This closes #1628


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/4584ac69
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/4584ac69
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/4584ac69

Branch: refs/heads/master
Commit: 4584ac6974c1eb0c3f09ca5f1700f05f8851a316
Parents: e714af7 4abca78
Author: Martyn Taylor <[hidden email]>
Authored: Wed Nov 29 08:52:58 2017 +0000
Committer: Martyn Taylor <[hidden email]>
Committed: Wed Nov 29 08:52:58 2017 +0000

----------------------------------------------------------------------
 .../core/impl/RemotingConnectionImpl.java       |  5 ++
 .../spi/core/protocol/RemotingConnection.java   | 10 ++++
 .../src/main/webapp/plugin/js/addresses.js      | 16 +++--
 .../src/main/webapp/plugin/js/connections.js    | 19 +++---
 .../src/main/webapp/plugin/js/consumers.js      | 34 ++++++-----
 .../src/main/webapp/plugin/js/producers.js      | 28 +++++----
 .../src/main/webapp/plugin/js/queues.js         | 18 +++---
 .../src/main/webapp/plugin/js/sessions.js       | 16 ++---
 .../ActiveMQProtonRemotingConnection.java       |  6 ++
 .../core/protocol/mqtt/MQTTConnection.java      |  6 ++
 .../protocol/openwire/OpenWireConnection.java   |  6 ++
 .../core/protocol/stomp/StompConnection.java    |  7 +++
 .../impl/ActiveMQServerControlImpl.java         |  7 ++-
 .../impl/view/ActiveMQAbstractView.java         |  8 +++
 .../core/management/impl/view/AddressView.java  | 13 ++--
 .../management/impl/view/ConnectionView.java    |  4 +-
 .../core/management/impl/view/ConsumerView.java |  4 +-
 .../core/management/impl/view/ProducerView.java |  2 +-
 .../core/management/impl/view/QueueView.java    |  2 +-
 .../core/management/impl/view/SessionView.java  |  4 +-
 .../view/predicate/AddressFilterPredicate.java  |  6 +-
 .../artemis/core/server/ConsumerInfo.java       | 63 ++++++++++++++++++++
 .../artemis/core/server/ServerConsumer.java     |  6 +-
 .../artemis/core/server/ServerSession.java      |  6 +-
 .../core/server/impl/ServerConsumerImpl.java    | 47 ++++++++++++++-
 .../core/server/impl/ServerSessionImpl.java     | 12 +++-
 .../integration/cli/DummyServerConsumer.java    | 56 +++++++++++++++++
 27 files changed, 326 insertions(+), 85 deletions(-)
----------------------------------------------------------------------