You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2009/12/17 00:34:54 UTC
svn commit: r891479 -
/activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/
Author: tabish
Date: Wed Dec 16 23:34:54 2009
New Revision: 891479
URL: http://svn.apache.org/viewvc?rev=891479&view=rev
Log:
Clean up the generated to String methods for the commands to make the logging easier to read.
Added:
activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/LocalTransactionIdGenerator.java (with props)
Modified:
activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/CommandClassGenerator.java
activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/ConnectionIdGenerator.java
activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/ConsumerIdGenerator.java
activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/ProducerIdGenerator.java
activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/SessionIdGenerator.java
Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/CommandClassGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/CommandClassGenerator.java?rev=891479&r1=891478&r2=891479&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/CommandClassGenerator.java (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/CommandClassGenerator.java Wed Dec 16 23:34:54 2009
@@ -207,12 +207,17 @@
protected void generateToStringBody( PrintWriter out ) {
- out.println(" return GetType().Name + \"[\" + ");
+ out.println(" return GetType().Name + \"[ \" + ");
+
+ if( getBaseClassName().equals( "BaseCommand" ) ) {
+ out.println(" \"commandId = \" + this.CommandId + \" \" + " );
+ out.println(" \"responseRequired = \" + this.ResponseRequired + \" \" + " );
+ }
for( JProperty property : getProperties() ) {
String name = property.getSimpleName();
- out.println(" \"" + name + "=\" + " + name + " + " );
+ out.println(" \"" + name + " = \" + " + name + " + \" \" + " );
}
out.println(" \"]\";");
Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/ConnectionIdGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/ConnectionIdGenerator.java?rev=891479&r1=891478&r2=891479&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/ConnectionIdGenerator.java (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/ConnectionIdGenerator.java Wed Dec 16 23:34:54 2009
@@ -18,6 +18,8 @@
import java.io.PrintWriter;
+import org.codehaus.jam.JProperty;
+
public class ConnectionIdGenerator extends CommandClassGenerator {
protected void generateConstructors( PrintWriter out ) {
@@ -43,4 +45,8 @@
super.generateConstructors(out);
}
+
+ protected void generateToStringBody( PrintWriter out ) {
+ out.println(" return this.value;");
+ }
}
Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/ConsumerIdGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/ConsumerIdGenerator.java?rev=891479&r1=891478&r2=891479&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/ConsumerIdGenerator.java (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/ConsumerIdGenerator.java Wed Dec 16 23:34:54 2009
@@ -37,6 +37,10 @@
super.generateConstructors(out);
}
+ protected void generateToStringBody( PrintWriter out ) {
+ out.println(" return this.connectionId + \":\" + this.sessionId + \":\" + this.value;");
+ }
+
protected void generateProperties( PrintWriter out ) {
out.println(" private SessionId parentId = null;");
Added: activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/LocalTransactionIdGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/LocalTransactionIdGenerator.java?rev=891479&view=auto
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/LocalTransactionIdGenerator.java (added)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/LocalTransactionIdGenerator.java Wed Dec 16 23:34:54 2009
@@ -0,0 +1,27 @@
+/**
+ * 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.nms.openwire.tool.commands;
+
+import java.io.PrintWriter;
+
+public class LocalTransactionIdGenerator extends CommandClassGenerator {
+
+ protected void generateToStringBody( PrintWriter out ) {
+ out.println(" return this.connectionId + \":\" + this.value;");
+ }
+
+}
Propchange: activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/LocalTransactionIdGenerator.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/ProducerIdGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/ProducerIdGenerator.java?rev=891479&r1=891478&r2=891479&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/ProducerIdGenerator.java (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/ProducerIdGenerator.java Wed Dec 16 23:34:54 2009
@@ -56,6 +56,10 @@
super.generateProperties(out);
}
+ protected void generateToStringBody( PrintWriter out ) {
+ out.println(" return this.connectionId + \":\" + this.sessionId + \":\" + this.value;");
+ }
+
protected void generateAdditonalMembers( PrintWriter out ) {
out.println(" public SessionId ParentId");
out.println(" {");
Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/SessionIdGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/SessionIdGenerator.java?rev=891479&r1=891478&r2=891479&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/SessionIdGenerator.java (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/SessionIdGenerator.java Wed Dec 16 23:34:54 2009
@@ -56,6 +56,10 @@
super.generateProperties(out);
}
+ protected void generateToStringBody( PrintWriter out ) {
+ out.println(" return this.connectionId + \":\" + this.value;");
+ }
+
protected void generateAdditonalMembers( PrintWriter out ) {
out.println(" public ConnectionId ParentId");
out.println(" {");