You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2010/07/07 06:21:15 UTC
svn commit: r961210 - in /activemq/sandbox/activemq-apollo-actor:
activemq-dto/src/main/java/org/apache/activemq/apollo/dto/
activemq-dto/src/main/resources/org/apache/activemq/apollo/dto/
activemq-web/src/main/scala/org/apache/activemq/apollo/web/reso...
Author: chirino
Date: Wed Jul 7 04:21:14 2010
New Revision: 961210
URL: http://svn.apache.org/viewvc?rev=961210&view=rev
Log:
More consistent handling of id lists in the dtos
Added:
activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/LongIdLabeledDTO.java
- copied, changed from r961209, activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/BrokerSummariesDTO.java
activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/LongIdListDTO.java
- copied, changed from r961209, activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/IdListDTO.java
activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/StringIdLabeledDTO.java
- copied, changed from r961209, activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/DestinationSummaryDTO.java
activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/StringIdListDTO.java
- copied, changed from r961209, activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/IdListDTO.java
Removed:
activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/BrokerSummariesDTO.java
activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/DestinationSummaryDTO.java
activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/IdListDTO.java
Modified:
activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/BrokerStatusDTO.java
activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/ConnectionStatusDTO.java
activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/ConnectorStatusDTO.java
activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/DestinationStatusDTO.java
activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/LongIdDTO.java
activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/StringIdDTO.java
activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/VirtualHostStatusDTO.java
activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/resources/org/apache/activemq/apollo/dto/jaxb.index
activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/scala/org/apache/activemq/apollo/web/resources/RootResource.scala
activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/scala/org/apache/activemq/apollo/web/resources/RuntimeResource.scala
activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/BrokerStatusDTO.scaml
activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/ConnectorStatusDTO.scaml
activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/DestinationStatusDTO.scaml
activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/VirtualHostStatusDTO.scaml
activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/web/resources/RootResource.index.scaml
activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/web.xml
Modified: activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/BrokerStatusDTO.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/BrokerStatusDTO.java?rev=961210&r1=961209&r2=961210&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/BrokerStatusDTO.java (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/BrokerStatusDTO.java Wed Jul 7 04:21:14 2010
@@ -30,8 +30,7 @@ import java.util.List;
*/
@XmlRootElement(name="broker-status")
@XmlAccessorType(XmlAccessType.FIELD)
-public class
- BrokerStatusDTO extends ServiceStatusDTO {
+public class BrokerStatusDTO extends ServiceStatusDTO {
/**
* The current time on the broker machine. In milliseconds since the epoch.
@@ -43,19 +42,19 @@ public class
* Ids of all the virtual hosts running on the broker
*/
@XmlElement(name="virtual-host")
- public List<Long> virtual_hosts = new ArrayList<Long>();
+ public List<LongIdLabeledDTO> virtual_hosts = new ArrayList<LongIdLabeledDTO>();
/**
* Ids of all the connectors running on the broker
*/
@XmlElement(name="connector")
- public List<Long> connectors = new ArrayList<Long>();
+ public List<LongIdLabeledDTO> connectors = new ArrayList<LongIdLabeledDTO>();
/**
* Ids of all the connections running on the broker
*/
@XmlElement(name="connection")
- public List<Long> connections = new ArrayList<Long>();
+ public List<LongIdLabeledDTO> connections = new ArrayList<LongIdLabeledDTO>();
/**
* The current running configuration of the object
Modified: activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/ConnectionStatusDTO.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/ConnectionStatusDTO.java?rev=961210&r1=961209&r2=961210&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/ConnectionStatusDTO.java (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/ConnectionStatusDTO.java Wed Jul 7 04:21:14 2010
@@ -48,14 +48,12 @@ public class ConnectionStatusDTO extends
/**
* The protocol the connection is using.
*/
- @JsonProperty
@XmlAttribute
public String transport;
/**
* The protocol the connection is using.
*/
- @JsonProperty
@XmlAttribute
public String protocol;
@@ -68,7 +66,6 @@ public class ConnectionStatusDTO extends
/**
* The connected user
*/
- @JsonProperty
@XmlAttribute
public String user;
}
Modified: activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/ConnectorStatusDTO.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/ConnectorStatusDTO.java?rev=961210&r1=961209&r2=961210&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/ConnectorStatusDTO.java (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/ConnectorStatusDTO.java Wed Jul 7 04:21:14 2010
@@ -42,7 +42,7 @@ public class ConnectorStatusDTO extends
* Ids of all open connections that the connector is managing.
*/
@XmlElement(name="connection")
- public List<Long> connections = new ArrayList<Long>();
+ public List<LongIdLabeledDTO> connections = new ArrayList<LongIdLabeledDTO>();
/**
* The current running configuration of the object
Modified: activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/DestinationStatusDTO.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/DestinationStatusDTO.java?rev=961210&r1=961209&r2=961210&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/DestinationStatusDTO.java (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/DestinationStatusDTO.java Wed Jul 7 04:21:14 2010
@@ -18,10 +18,7 @@ package org.apache.activemq.apollo.dto;
import org.codehaus.jackson.annotate.JsonProperty;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;
@@ -33,23 +30,35 @@ import java.util.List;
*/
@XmlRootElement(name="destination-status")
@XmlAccessorType(XmlAccessType.FIELD)
-public class DestinationStatusDTO extends DestinationSummaryDTO {
+public class DestinationStatusDTO extends LongIdDTO {
+
+ /**
+ * The destination name
+ */
+ @XmlAttribute
+ public String name;
+
+ /**
+ * The routing domain
+ */
+ @XmlAttribute
+ public String domain;
/**
* Ids of all connections that are producing to the destination
*/
@XmlElement(name="producer")
- public List<Long> producers = new ArrayList<Long>();
+ public List<LongIdLabeledDTO> producers = new ArrayList<LongIdLabeledDTO>();
/**
* Ids of all connections that are consuming from the destination
*/
@XmlElement(name="consumer")
- public List<Long> consumers = new ArrayList<Long>();
+ public List<LongIdLabeledDTO> consumers = new ArrayList<LongIdLabeledDTO>();
/**
* Ids of all queues that are associated with the destination
*/
@XmlElement(name="queue")
- public List<Long> queues = new ArrayList<Long>();
+ public List<LongIdLabeledDTO> queues = new ArrayList<LongIdLabeledDTO>();
}
\ No newline at end of file
Modified: activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/LongIdDTO.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/LongIdDTO.java?rev=961210&r1=961209&r2=961210&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/LongIdDTO.java (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/LongIdDTO.java Wed Jul 7 04:21:14 2010
@@ -26,7 +26,6 @@ import javax.xml.bind.annotation.XmlRoot
/**
* @author <a href="http://hiramchirino.com">Hiram Chirino</a>
*/
-@XmlRootElement(name="id")
@XmlAccessorType(XmlAccessType.FIELD)
public class LongIdDTO {
@@ -36,5 +35,10 @@ public class LongIdDTO {
@XmlAttribute
public long id;
-
+ public LongIdDTO() {
+ }
+
+ public LongIdDTO(long id) {
+ this.id = id;
+ }
}
\ No newline at end of file
Copied: activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/LongIdLabeledDTO.java (from r961209, activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/BrokerSummariesDTO.java)
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/LongIdLabeledDTO.java?p2=activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/LongIdLabeledDTO.java&p1=activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/BrokerSummariesDTO.java&r1=961209&r2=961210&rev=961210&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/BrokerSummariesDTO.java (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/LongIdLabeledDTO.java Wed Jul 7 04:21:14 2010
@@ -16,8 +16,6 @@
*/
package org.apache.activemq.apollo.dto;
-import org.codehaus.jackson.annotate.JsonProperty;
-
import javax.xml.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;
@@ -25,15 +23,22 @@ import java.util.List;
/**
* @author <a href="http://hiramchirino.com">Hiram Chirino</a>
*/
-@XmlRootElement(name="broker-summaries")
@XmlAccessorType(XmlAccessType.FIELD)
-public class BrokerSummariesDTO {
+public class LongIdLabeledDTO extends LongIdDTO {
+
+ @XmlAttribute
+ public String label;
+
+
+ public LongIdLabeledDTO() {
+ }
- /**
- * The list of broker summaries.
- */
- @JsonProperty
- @XmlElement
- public List<BrokerSummaryDTO> brokers = new ArrayList<BrokerSummaryDTO>();
+ public LongIdLabeledDTO(long id) {
+ super(id);
+ }
+ public LongIdLabeledDTO(long id, String label) {
+ super(id);
+ this.label = label;
+ }
}
\ No newline at end of file
Copied: activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/LongIdListDTO.java (from r961209, activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/IdListDTO.java)
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/LongIdListDTO.java?p2=activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/LongIdListDTO.java&p1=activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/IdListDTO.java&r1=961209&r2=961210&rev=961210&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/IdListDTO.java (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/LongIdListDTO.java Wed Jul 7 04:21:14 2010
@@ -28,14 +28,14 @@ import java.util.List;
/**
* @author <a href="http://hiramchirino.com">Hiram Chirino</a>
*/
-@XmlRootElement(name="id-list")
+@XmlRootElement(name="ll")
@XmlAccessorType(XmlAccessType.FIELD)
-public class IdListDTO {
+public class LongIdListDTO {
/**
* A list of ids.
*/
- @XmlElement(name="id")
- public List<String> ids = new ArrayList<String>();
+ @XmlElement(name="item")
+ public List<LongIdLabeledDTO> items = new ArrayList<LongIdLabeledDTO>();
}
\ No newline at end of file
Modified: activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/StringIdDTO.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/StringIdDTO.java?rev=961210&r1=961209&r2=961210&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/StringIdDTO.java (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/StringIdDTO.java Wed Jul 7 04:21:14 2010
@@ -25,7 +25,6 @@ import java.util.List;
/**
* @author <a href="http://hiramchirino.com">Hiram Chirino</a>
*/
-@XmlRootElement(name="id")
@XmlAccessorType(XmlAccessType.FIELD)
public class StringIdDTO {
@@ -35,5 +34,10 @@ public class StringIdDTO {
@XmlAttribute
public String id;
+ public StringIdDTO() {
+ }
+ public StringIdDTO(String id){
+ this.id = id;
+ }
}
\ No newline at end of file
Copied: activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/StringIdLabeledDTO.java (from r961209, activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/DestinationSummaryDTO.java)
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/StringIdLabeledDTO.java?p2=activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/StringIdLabeledDTO.java&p1=activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/DestinationSummaryDTO.java&r1=961209&r2=961210&rev=961210&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/DestinationSummaryDTO.java (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/StringIdLabeledDTO.java Wed Jul 7 04:21:14 2010
@@ -16,30 +16,29 @@
*/
package org.apache.activemq.apollo.dto;
-import org.codehaus.jackson.annotate.JsonProperty;
-
-import javax.xml.bind.annotation.*;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
/**
- * <p>
- * </p>
- *
* @author <a href="http://hiramchirino.com">Hiram Chirino</a>
*/
-@XmlRootElement(name="destination-summary")
@XmlAccessorType(XmlAccessType.FIELD)
-public class DestinationSummaryDTO extends LongIdDTO {
+public class StringIdLabeledDTO extends StringIdDTO {
- /**
- * The destination name
- */
@XmlAttribute
- public String name;
+ public String label;
- /**
- * The routing domain
- */
- @XmlAttribute
- public String domain;
-
+
+ public StringIdLabeledDTO() {
+ }
+
+ public StringIdLabeledDTO(String id) {
+ super(id);
+ }
+
+ public StringIdLabeledDTO(String id, String label) {
+ super(id);
+ this.label = label;
+ }
}
\ No newline at end of file
Copied: activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/StringIdListDTO.java (from r961209, activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/IdListDTO.java)
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/StringIdListDTO.java?p2=activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/StringIdListDTO.java&p1=activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/IdListDTO.java&r1=961209&r2=961210&rev=961210&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/IdListDTO.java (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/StringIdListDTO.java Wed Jul 7 04:21:14 2010
@@ -16,8 +16,6 @@
*/
package org.apache.activemq.apollo.dto;
-import org.codehaus.jackson.annotate.JsonProperty;
-
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
@@ -28,14 +26,14 @@ import java.util.List;
/**
* @author <a href="http://hiramchirino.com">Hiram Chirino</a>
*/
-@XmlRootElement(name="id-list")
+@XmlRootElement(name="sl")
@XmlAccessorType(XmlAccessType.FIELD)
-public class IdListDTO {
+public class StringIdListDTO {
/**
* A list of ids.
*/
- @XmlElement(name="id")
- public List<String> ids = new ArrayList<String>();
+ @XmlElement(name="item")
+ public List<StringIdLabeledDTO> items = new ArrayList<StringIdLabeledDTO>();
}
\ No newline at end of file
Modified: activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/VirtualHostStatusDTO.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/VirtualHostStatusDTO.java?rev=961210&r1=961209&r2=961210&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/VirtualHostStatusDTO.java (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/java/org/apache/activemq/apollo/dto/VirtualHostStatusDTO.java Wed Jul 7 04:21:14 2010
@@ -42,7 +42,7 @@ public class VirtualHostStatusDTO extend
* Ids of all the destinations running on the broker
*/
@XmlElement(name="destination")
- public List<DestinationSummaryDTO> destinations = new ArrayList<DestinationSummaryDTO>();
+ public List<LongIdLabeledDTO> destinations = new ArrayList<LongIdLabeledDTO>();
/**
Modified: activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/resources/org/apache/activemq/apollo/dto/jaxb.index
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/resources/org/apache/activemq/apollo/dto/jaxb.index?rev=961210&r1=961209&r2=961210&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/resources/org/apache/activemq/apollo/dto/jaxb.index (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-dto/src/main/resources/org/apache/activemq/apollo/dto/jaxb.index Wed Jul 7 04:21:14 2010
@@ -16,22 +16,27 @@
## ------------------------------------------------------------------------
BrokerDTO
BrokerStatusDTO
-BrokerSummariesDTO
BrokerSummaryDTO
CassandraStoreDTO
ConnectionStatusDTO
ConnectorDTO
ConnectorStatusDTO
DestinationStatusDTO
-DestinationSummaryDTO
EntryStatusDTO
HawtDBStoreDTO
-IdListDTO
+HawtDBStoreStatusDTO
+IntMetricDTO
LongIdDTO
+LongIdLabeledDTO
+LongIdListDTO
QueueStatusDTO
ServiceDTO
ServiceStatusDTO
StoreDTO
+StoreStatusDTO
StringIdDTO
+StringIdLabeledDTO
+StringIdListDTO
+TimeMetricDTO
VirtualHostDTO
-VirtualHostStatusDTO
+VirtualHostStatusDTO
\ No newline at end of file
Modified: activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/scala/org/apache/activemq/apollo/web/resources/RootResource.scala
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/scala/org/apache/activemq/apollo/web/resources/RootResource.scala?rev=961210&r1=961209&r2=961210&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/scala/org/apache/activemq/apollo/web/resources/RootResource.scala (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/scala/org/apache/activemq/apollo/web/resources/RootResource.scala Wed Jul 7 04:21:14 2010
@@ -26,14 +26,14 @@ import com.sun.jersey.api.view.ImplicitP
import org.fusesource.hawtdispatch.Future
import Response._
import Response.Status._
-import org.apache.activemq.apollo.dto.{IdListDTO, BrokerSummaryDTO, BrokerDTO}
-import java.util.{Arrays, Collections}
import org.apache.activemq.apollo.web.ConfigStore
import org.apache.activemq.apollo.broker.BrokerRegistry
import collection.JavaConversions._
import com.sun.jersey.api.core.ResourceContext
import org.fusesource.scalate.RenderContext
import java.util.concurrent.TimeUnit
+import org.apache.activemq.apollo.dto._
+import java.util.{Arrays, Collections}
/**
* Defines the default representations to be used on resources
@@ -127,11 +127,12 @@ class RootResource() extends Resource {
@GET
def brokers = {
- val rc = new IdListDTO
- val ids = Future[List[String]] { cb=>
+ val rc = new StringIdListDTO
+ Future[List[String]] { cb=>
ConfigStore().listBrokers(cb)
- }.toArray[String]
- rc.ids.addAll(Arrays.asList(ids: _*))
+ }.foreach { x=>
+ rc.items.add( new StringIdLabeledDTO(x,x) )
+ }
rc
}
Modified: activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/scala/org/apache/activemq/apollo/web/resources/RuntimeResource.scala
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/scala/org/apache/activemq/apollo/web/resources/RuntimeResource.scala?rev=961210&r1=961209&r2=961210&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/scala/org/apache/activemq/apollo/web/resources/RuntimeResource.scala (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/scala/org/apache/activemq/apollo/web/resources/RuntimeResource.scala Wed Jul 7 04:21:14 2010
@@ -77,16 +77,18 @@ case class RuntimeResource(parent:Broker
result.config = broker.config
broker.virtualHosts.values.foreach{ host=>
- result.virtual_hosts.add( host.id )
+ // TODO: may need to sync /w virtual host's dispatch queue
+ result.virtual_hosts.add( new LongIdLabeledDTO(host.id, host.config.id) )
}
broker.connectors.foreach{ c=>
- result.connectors.add(c.id)
+ result.connectors.add( new LongIdLabeledDTO(c.id, c.config.id) )
}
broker.connectors.foreach{ connector=>
- connector.connections.keysIterator.foreach { id =>
- result.connections.add(id)
+ connector.connections.foreach { case (id,connection) =>
+ // TODO: may need to sync /w connection's dispatch queue
+ result.connections.add( new LongIdLabeledDTO(id, connection.transport.getRemoteAddress ) )
}
}
@@ -96,9 +98,10 @@ case class RuntimeResource(parent:Broker
@GET @Path("virtual-hosts")
- def virtualHosts :Array[jl.Long] = {
- val list: List[jl.Long] = get.virtual_hosts
- list.toArray(new Array[jl.Long](list.size))
+ def virtualHosts = {
+ val rc = new LongIdListDTO
+ rc.items.addAll(get.virtual_hosts)
+ rc
}
@GET @Path("virtual-hosts/{id}")
@@ -111,11 +114,7 @@ case class RuntimeResource(parent:Broker
result.config = virtualHost.config
virtualHost.router.destinations.valuesIterator.foreach { node=>
- val summary = new DestinationSummaryDTO
- summary.id = node.id
- summary.name = node.destination.getName.toString
- summary.domain = node.destination.getDomain.toString
- result.destinations.add(summary)
+ result.destinations.add(new LongIdLabeledDTO(node.id, node.destination.getName.toString))
}
if( virtualHost.store != null ) {
@@ -149,7 +148,8 @@ case class RuntimeResource(parent:Broker
node match {
case qdn:virtualHost.router.QueueDestinationNode =>
- result.queues.add(qdn.queue.id)
+ // todo give queues some descriptive name of what they are being used for.
+ result.queues.add(new LongIdLabeledDTO(qdn.queue.id, qdn.queue.id.toString))
case _ =>
}
result
@@ -216,9 +216,10 @@ case class RuntimeResource(parent:Broker
@GET @Path("connectors")
- def connectors :Array[jl.Long] = {
- val list: List[jl.Long] = get.connectors
- list.toArray(new Array[jl.Long](list.size))
+ def connectors = {
+ val rc = new LongIdListDTO
+ rc.items.addAll(get.connectors)
+ rc
}
@GET @Path("connectors/{id}")
@@ -235,9 +236,11 @@ case class RuntimeResource(parent:Broker
result.config = connector.config
result.accepted = connector.accept_counter.get
- connector.connections.keysIterator.foreach { id=>
- result.connections.add(id)
+ connector.connections.foreach { case (id,connection) =>
+ // TODO: may need to sync /w connection's dispatch queue
+ result.connections.add( new LongIdLabeledDTO(id, connection.transport.getRemoteAddress ) )
}
+
cb(Some(result))
}
}
@@ -245,17 +248,19 @@ case class RuntimeResource(parent:Broker
@GET @Path("connections")
- def connections :Array[Long] = {
- val rc:Array[Long] = with_broker { case (broker, cb) =>
- val rc = ListBuffer[Long]()
+ def connections:LongIdListDTO = {
+ with_broker { case (broker, cb) =>
+ val rc = new LongIdListDTO
+
broker.connectors.foreach { connector=>
- connector.connections.keys.foreach { id =>
- rc += id.longValue
+ connector.connections.foreach { case (id,connection) =>
+ // TODO: may need to sync /w connection's dispatch queue
+ rc.items.add(new LongIdLabeledDTO(id, connection.transport.getRemoteAddress ))
}
}
- cb(Some(rc.toArray))
+
+ cb(Some(rc))
}
- rc.sorted
}
@GET @Path("connections/{id}")
Modified: activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/BrokerStatusDTO.scaml
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/BrokerStatusDTO.scaml?rev=961210&r1=961209&r2=961210&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/BrokerStatusDTO.scaml (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/BrokerStatusDTO.scaml Wed Jul 7 04:21:14 2010
@@ -8,16 +8,16 @@
%ul
- for( x <- virtual_hosts )
%li
- %a(href="runtime/virtual-hosts/#{x}") #{x}
+ %a(href={ path("virtual-hosts/"+ x.id) }) #{x.label}
%h2 Connectors
%ul
- for( x <- connectors )
%li
- %a(href={ path("connectors/"+x) }) #{x}
+ %a(href={ path("connectors/"+x.id) }) #{x.label}
%h2 Connections
%ul
- for( x <- connections )
%li
- %a(href={ path("connections/"+x) }) #{x}
+ %a(href={ path("connections/"+x.id) }) #{x.label}
Modified: activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/ConnectorStatusDTO.scaml
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/ConnectorStatusDTO.scaml?rev=961210&r1=961209&r2=961210&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/ConnectorStatusDTO.scaml (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/ConnectorStatusDTO.scaml Wed Jul 7 04:21:14 2010
@@ -12,6 +12,6 @@
%ul
- for( x <- connections )
%li
- %a(href={ path("../../connections/"+x) }) #{x}
+ %a(href={ path("../../connections/"+x.id) }) #{x.label}
Modified: activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/DestinationStatusDTO.scaml
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/DestinationStatusDTO.scaml?rev=961210&r1=961209&r2=961210&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/DestinationStatusDTO.scaml (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/DestinationStatusDTO.scaml Wed Jul 7 04:21:14 2010
@@ -10,18 +10,18 @@
%ul
- for( x <- queues )
%li
- %a(href={ path("../../queues/"+x) }) #{x}
+ %a(href={ path("../../queues/"+x.id) }) #{x.label}
%h2 Producers
%ul
- for( x <- producers )
%li
- %a(href={ path("../../../../connections/"+x) }) #{x}
+ %a(href={ path("../../../../connections/"+x.id) }) #{x.label}
%h2 Consumers
%ul
- for( x <- consumers )
%li
- %a(href={ path("../../../../connections/"+x) }) #{x}
+ %a(href={ path("../../../../connections/"+x.id) }) #{x.label}
Modified: activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/VirtualHostStatusDTO.scaml
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/VirtualHostStatusDTO.scaml?rev=961210&r1=961209&r2=961210&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/VirtualHostStatusDTO.scaml (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/dto/VirtualHostStatusDTO.scaml Wed Jul 7 04:21:14 2010
@@ -10,10 +10,9 @@
%p
%a(href={ path("store") }) store
-
%h2 Destinations
%ul
- for( x <- destinations )
%li
- %a(href={ path("destinations/"+x.id) }) #{x.name}
+ %a(href={ path("destinations/"+x.id) }) #{x.label}
Modified: activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/web/resources/RootResource.index.scaml
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/web/resources/RootResource.index.scaml?rev=961210&r1=961209&r2=961210&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/web/resources/RootResource.index.scaml (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/org/apache/activemq/apollo/web/resources/RootResource.index.scaml Wed Jul 7 04:21:14 2010
@@ -4,6 +4,6 @@
%h1 Brokers
%ul
- - for( x <- brokers.ids )
+ - for( x <- brokers.items )
%li
- %a(href="brokers/#{x}") #{x}
+ %a(href="brokers/#{x.id}") #{x.label}
Modified: activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/web.xml?rev=961210&r1=961209&r2=961210&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/web.xml (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-web/src/main/webapp/WEB-INF/web.xml Wed Jul 7 04:21:14 2010
@@ -24,9 +24,14 @@
<url-pattern>/*</url-pattern>
</filter-mapping>
+ <welcome-file-list>
+ <welcome-file>index.scaml</welcome-file>
+ </welcome-file-list>
+
<error-page>
<error-code>500</error-code>
- <location>/WEB-INF/errors/scalate/500.scaml</location>
+ <location>/WEB-INF/scalate/errors/500.scaml</location>
</error-page>
+
</web-app>