activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r397217 - in /incubator/activemq/trunk/activemq-web-console: ./ src/main/java/org/apache/activemq/web/MessageFacade.java src/main/webapp/WEB-INF/tags/jms/body.tag
Date Wed, 26 Apr 2006 15:14:54 GMT
Author: jstrachan
Date: Wed Apr 26 08:14:52 2006
New Revision: 397217

URL: http://svn.apache.org/viewcvs?rev=397217&view=rev
Log:
added a tag to display a JMS message body

Added:
    incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/MessageFacade.java
  (with props)
    incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/jms/body.tag
Modified:
    incubator/activemq/trunk/activemq-web-console/   (props changed)

Propchange: incubator/activemq/trunk/activemq-web-console/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Apr 26 08:14:52 2006
@@ -0,0 +1,2 @@
+
+activemq-data

Added: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/MessageFacade.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/MessageFacade.java?rev=397217&view=auto
==============================================================================
--- incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/MessageFacade.java
(added)
+++ incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/MessageFacade.java
Wed Apr 26 08:14:52 2006
@@ -0,0 +1,43 @@
+/**
+ *
+ * Copyright 2005-2006 The Apache Software Foundation
+ *
+ * Licensed 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.web;
+
+import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.command.ActiveMQMessage;
+
+import javax.jms.Message;
+
+/**
+ *
+ * @version $Revision$
+ */
+public class MessageFacade extends BrokerFacade {
+
+    private String id;
+    private ActiveMQMessage message;
+    
+    public MessageFacade(BrokerService brokerService) {
+        super(brokerService);
+    }
+
+    public ActiveMQMessage getMessage() {
+        if (message != null) {
+            // TODO ??
+        }
+        return message;
+    }
+}

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/MessageFacade.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/MessageFacade.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: incubator/activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/MessageFacade.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/jms/body.tag
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/jms/body.tag?rev=397217&view=auto
==============================================================================
--- incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/jms/body.tag
(added)
+++ incubator/activemq/trunk/activemq-web-console/src/main/webapp/WEB-INF/tags/jms/body.tag
Wed Apr 26 08:14:52 2006
@@ -0,0 +1,17 @@
+<%@ attribute name="message" type="javax.jms.Message" required="true"  %>
+<%@ attribute name="var" type="java.lang.String" required="true"  %>
+<%@ tag import="javax.jms.TextMessage" %>
+<%@ tag import="javax.jms.ObjectMessage" %>
+<%
+  Object value = null;
+	if (message != null) { 
+	  if (message instanceof TextMessage) {
+	  		value = ((TextMessage) message).getText();
+  		}
+  		else if (message instanceof ObjectMessage) {
+  			value = ((ObjectMessage) message).getObject();
+  	  }
+  	}
+	request.setAttribute(var, value);
+  System.out.println("var: " + var + " is now: " + value);
+%>



Mime
View raw message