cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1329053 - /cxf/trunk/osgi/karaf/commands/src/main/java/org/apache/cxf/karaf/commands/ListEndpointsCommand.java
Date Mon, 23 Apr 2012 04:11:07 GMT
Author: ffang
Date: Mon Apr 23 04:11:06 2012
New Revision: 1329053

URL: http://svn.apache.org/viewvc?rev=1329053&view=rev
Log:
[CXF-4252]cxf:list-endpoints karaf command should also have a busid column

Modified:
    cxf/trunk/osgi/karaf/commands/src/main/java/org/apache/cxf/karaf/commands/ListEndpointsCommand.java

Modified: cxf/trunk/osgi/karaf/commands/src/main/java/org/apache/cxf/karaf/commands/ListEndpointsCommand.java
URL: http://svn.apache.org/viewvc/cxf/trunk/osgi/karaf/commands/src/main/java/org/apache/cxf/karaf/commands/ListEndpointsCommand.java?rev=1329053&r1=1329052&r2=1329053&view=diff
==============================================================================
--- cxf/trunk/osgi/karaf/commands/src/main/java/org/apache/cxf/karaf/commands/ListEndpointsCommand.java
(original)
+++ cxf/trunk/osgi/karaf/commands/src/main/java/org/apache/cxf/karaf/commands/ListEndpointsCommand.java
Mon Apr 23 04:11:06 2012
@@ -35,8 +35,8 @@ import org.apache.karaf.shell.console.Os
 @Command(scope = "cxf", name = "list-endpoints", 
     description = "Lists all CXF Endpoints on a Bus.")
 public class ListEndpointsCommand extends OsgiCommandSupport {
-    protected static final String HEADER_FORMAT = "%-25s %-10s %-60s";
-    protected static final String OUTPUT_FORMAT = "[%-23s] [%-8s] [%-58s]";
+    protected static final String HEADER_FORMAT = "%-25s %-10s %-60s %-40s";
+    protected static final String OUTPUT_FORMAT = "[%-23s] [%-8s] [%-58s] [%-38s]";
     
     @Argument(index = 0, name = "bus", 
         description = "The CXF bus name where to look for the Endpoints", 
@@ -65,12 +65,13 @@ public class ListEndpointsCommand extend
             ServerRegistry reg = b.getExtension(ServerRegistry.class);
             List<Server> servers = reg.getServers();
             System.out.println(String.format(HEADER_FORMAT, 
-                                             "Name", "State", "Address"));
+                                             "Name", "State", "Address", "BusID"));
             for (Server serv : servers) {
                 String qname = serv.getEndpoint().getEndpointInfo().getName().getLocalPart();
                 String started = serv.isStarted() ? "Started" : "Stopped";
                 String address = serv.getEndpoint().getEndpointInfo().getAddress();
-                System.out.println(String.format(OUTPUT_FORMAT, qname, started, address));
+                String busId = b.getId();
+                System.out.println(String.format(OUTPUT_FORMAT, qname, started, address,
busId));
             }
         }
         return null;



Mime
View raw message