activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r464110 - in /incubator/activemq/trunk: activemq-core/src/main/java/org/apache/activemq/ activemq-core/src/main/java/org/apache/activemq/broker/ activemq-core/src/main/java/org/apache/activemq/broker/ft/ activemq-core/src/main/java/org/apac...
Date Sun, 15 Oct 2006 03:31:31 GMT
Author: chirino
Date: Sat Oct 14 20:31:28 2006
New Revision: 464110

URL: http://svn.apache.org/viewvc?view=rev&rev=464110
Log:
http://issues.apache.org/activemq/browse/AMQ-976

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ft/MasterBroker.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ft/MasterConnector.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/ForwardingBridge.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/proxy/ProxyConnection.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/CommandJoiner.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/DefaultTransportListener.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/MarshallingTransportFilter.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/MutexTransport.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/ResponseCorrelator.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/Transport.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFilter.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportListener.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportLogger.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportSupport.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/WireFormatNegotiator.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/mock/MockTransport.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/reliable/ReliableTransport.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompTransportFilter.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/ResponseRedirectInterceptor.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransport.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportServer.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransport.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/StubConnection.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/StubTransport.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/StubTransportListener.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/BadConnectionTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/fanout/FanoutTransportBrokerTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/InactivityMonitorTest.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTestSupport.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTransportUsingServerTest.java
    incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/BlockingQueueTransport.java
    incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java
    incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransport.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java Sat Oct 14 20:31:28 2006
@@ -1143,7 +1143,7 @@
         } else {
 
             try {
-                Response response = this.transport.request(command);
+                Response response = (Response) this.transport.request(command);
                 if (response.isException()) {
                     ExceptionResponse er = (ExceptionResponse) response;
                     if (er.getException() instanceof JMSException)
@@ -1171,7 +1171,7 @@
         } else {
 
             try {
-                Response response = this.transport.request(command,timeout);
+                Response response = (Response) this.transport.request(command,timeout);
                 if (response!=null && response.isException()) {
                     ExceptionResponse er = (ExceptionResponse) response;
                     if (er.getException() instanceof JMSException)
@@ -1427,7 +1427,8 @@
     /**
      * @param command - the command to consume
      */
-    public void onCommand(final Command command) {
+    public void onCommand(final Object o) {
+    	final Command command = (Command) o;
         if (!closed.get() && command != null) {
             if (command.isMessageDispatch()) {
                 MessageDispatch md = (MessageDispatch) command;

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java Sat Oct 14 20:31:28 2006
@@ -58,7 +58,8 @@
         connector.setBrokerName(broker.getBrokerName());
         this.transport = transport;
         this.transport.setTransportListener(new DefaultTransportListener() {
-            public void onCommand(Command command) {
+            public void onCommand(Object o) {
+            	Command command = (Command) o;
                 Response response = service(command);
                 if (response != null) {
                     dispatch(response);

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ft/MasterBroker.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ft/MasterBroker.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ft/MasterBroker.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ft/MasterBroker.java Sat Oct 14 20:31:28 2006
@@ -360,7 +360,7 @@
     protected void sendSyncToSlave(Command command){
         try{
 
-            Response response=slave.request(command);
+            Response response=(Response) slave.request(command);
             if (response.isException()){
                 ExceptionResponse er=(ExceptionResponse)response;
                 log.error("Slave Failed",er.getException());

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ft/MasterConnector.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ft/MasterConnector.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ft/MasterConnector.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/ft/MasterConnector.java Sat Oct 14 20:31:28 2006
@@ -109,7 +109,7 @@
         log.info("Starting a network connection between " + localBroker + " and " + remoteBroker + " has been established.");
 
         localBroker.setTransportListener(new DefaultTransportListener() {
-            public void onCommand(Command command) {
+            public void onCommand(Object command) {
             }
 
             public void onException(IOException error) {
@@ -120,7 +120,8 @@
         });
 
         remoteBroker.setTransportListener(new DefaultTransportListener() {
-            public void onCommand(Command command) {
+            public void onCommand(Object o) {
+            	Command command = (Command) o;
                 if (started.get()) {
                     serviceRemoteCommand(command);
                 }

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java Sat Oct 14 20:31:28 2006
@@ -116,7 +116,8 @@
 
     public void start() throws Exception {
         localBroker.setTransportListener(new DefaultTransportListener(){
-            public void onCommand(Command command){
+            public void onCommand(Object o){
+            	Command command = (Command) o;
                 serviceLocalCommand(command);
             }
     
@@ -125,7 +126,8 @@
             }
         });
         remoteBroker.setTransportListener(new TransportListener(){
-            public void onCommand(Command command){
+            public void onCommand(Object o){
+            	Command command = (Command) o;
                 serviceRemoteCommand(command);
             }
     

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/ForwardingBridge.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/ForwardingBridge.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/ForwardingBridge.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/ForwardingBridge.java Sat Oct 14 20:31:28 2006
@@ -17,6 +17,8 @@
  */
 package org.apache.activemq.network;
 
+import java.io.IOException;
+
 import org.apache.activemq.command.ActiveMQQueue;
 import org.apache.activemq.command.ActiveMQTopic;
 import org.apache.activemq.command.BrokerId;
@@ -43,8 +45,6 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-import java.io.IOException;
-
 /**
  * Forwards all messages from the local broker to the remote broker.
  * 
@@ -86,7 +86,8 @@
         log.info("Starting a network connection between " + localBroker + " and " + remoteBroker + " has been established.");
 
         localBroker.setTransportListener(new DefaultTransportListener(){
-            public void onCommand(Command command) {
+            public void onCommand(Object o) {
+            	Command command = (Command) o;
                 serviceLocalCommand(command);
             }
             public void onException(IOException error) {
@@ -95,7 +96,8 @@
         });
         
         remoteBroker.setTransportListener(new DefaultTransportListener(){
-            public void onCommand(Command command) {
+            public void onCommand(Object o) {
+            	Command command = (Command) o;
                 serviceRemoteCommand(command);
             }
             public void onException(IOException error) {

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/proxy/ProxyConnection.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/proxy/ProxyConnection.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/proxy/ProxyConnection.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/proxy/ProxyConnection.java Sat Oct 14 20:31:28 2006
@@ -19,7 +19,6 @@
 
 import java.io.IOException;
 import org.apache.activemq.Service;
-import org.apache.activemq.command.Command;
 import org.apache.activemq.command.ShutdownInfo;
 import org.apache.activemq.transport.DefaultTransportListener;
 import org.apache.activemq.transport.Transport;
@@ -60,7 +59,7 @@
         }
             
         this.localTransport.setTransportListener(new DefaultTransportListener() {
-            public void onCommand(Command command) {
+            public void onCommand(Object command) {
                 boolean shutdown=false;
                 if( command.getClass() == ShutdownInfo.class ) {
                     shuttingDown.set(true);
@@ -82,7 +81,7 @@
         });
         
         this.remoteTransport.setTransportListener(new DefaultTransportListener() {
-            public void onCommand(Command command) {
+            public void onCommand(Object command) {
                 try {
                     localTransport.oneway(command);
                 } catch (IOException error) {

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/CommandJoiner.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/CommandJoiner.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/CommandJoiner.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/CommandJoiner.java Sat Oct 14 20:31:28 2006
@@ -46,7 +46,8 @@
         this.wireFormat = wireFormat;
     }
 
-    public void onCommand(Command command) {
+    public void onCommand(Object o) {
+    	Command command = (Command) o;
         byte type = command.getDataStructureType();
         if (type == PartialCommand.DATA_STRUCTURE_TYPE || type == LastPartialCommand.DATA_STRUCTURE_TYPE) {
             PartialCommand header = (PartialCommand) command;

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/DefaultTransportListener.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/DefaultTransportListener.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/DefaultTransportListener.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/DefaultTransportListener.java Sat Oct 14 20:31:28 2006
@@ -19,7 +19,6 @@
 
 import java.io.IOException;
 
-import org.apache.activemq.command.Command;
 
 /**
  * An asynchronous listener of commands
@@ -32,7 +31,7 @@
      * called to process a command
      * @param command
      */
-    public void onCommand(Command command){
+    public void onCommand(Object command){
     }
     /**
      * An unrecoverable exception has occured on the transport

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java Sat Oct 14 20:31:28 2006
@@ -19,7 +19,6 @@
 
 import java.io.IOException;
 
-import org.apache.activemq.command.Command;
 import org.apache.activemq.command.KeepAliveInfo;
 import org.apache.activemq.command.WireFormatInfo;
 import org.apache.activemq.thread.Scheduler;
@@ -107,10 +106,10 @@
         commandReceived.set(false);
     }
 
-    public void onCommand(Command command) {
+    public void onCommand(Object command) {
         inReceive.set(true);
         try {
-            if( command.isWireFormatInfo() ) {
+            if( command.getClass() == WireFormatInfo.class ) {
                 synchronized( this ) {
                     remoteWireFormatInfo = (WireFormatInfo) command;
                     try {
@@ -120,7 +119,7 @@
                     }
                 }
             }
-            getTransportListener().onCommand(command);
+            transportListener.onCommand(command);
         } finally {
             inReceive.set(false);
             commandReceived.set(true);
@@ -128,18 +127,18 @@
     }
 
     
-    public void oneway(Command command) throws IOException {
+    public void oneway(Object o) throws IOException {
         // Disable inactivity monitoring while processing a command.
         inSend.set(true);
         commandSent.set(true);
         try {
-            if( command.isWireFormatInfo() ) {
+            if( o.getClass() == WireFormatInfo.class ) {
                 synchronized( this ) {
-                    localWireFormatInfo = (WireFormatInfo) command;
+                    localWireFormatInfo = (WireFormatInfo) o;
                     startMonitorThreads();
                 }
             }
-            next.oneway(command);
+            next.oneway(o);
         } finally {
             inSend.set(false);
         }
@@ -147,7 +146,7 @@
     
     public void onException(IOException error) {
         stopMonitorThreads();
-        getTransportListener().onException(error);
+        transportListener.onException(error);
     }
     
     

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/MarshallingTransportFilter.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/MarshallingTransportFilter.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/MarshallingTransportFilter.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/MarshallingTransportFilter.java Sat Oct 14 20:31:28 2006
@@ -33,11 +33,11 @@
         this.remoteWireFormat = remoteWireFormat;
     }
     
-    public void oneway(Command command) throws IOException {
+    public void oneway(Object command) throws IOException {
         next.oneway((Command) remoteWireFormat.unmarshal(localWireFormat.marshal(command)));
     }
     
-    public void onCommand(Command command) {
+    public void onCommand(Object command) {
         try {
             getTransportListener().onCommand((Command)localWireFormat.unmarshal(remoteWireFormat.marshal(command)));
         } catch (IOException e) {

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/MutexTransport.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/MutexTransport.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/MutexTransport.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/MutexTransport.java Sat Oct 14 20:31:28 2006
@@ -19,8 +19,6 @@
 
 import java.io.IOException;
 
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.Response;
 
 
 /**
@@ -34,25 +32,25 @@
         super(next);
     }
 
-    public FutureResponse asyncRequest(Command command, ResponseCallback responseCallback) throws IOException {
+    public FutureResponse asyncRequest(Object command, ResponseCallback responseCallback) throws IOException {
         synchronized(writeMutex) {
             return next.asyncRequest(command, null);
         }
     }
 
-    public void oneway(Command command) throws IOException {
+    public void oneway(Object command) throws IOException {
         synchronized(writeMutex) {
             next.oneway(command);
         }
     }
 
-    public Response request(Command command) throws IOException {
+    public Object request(Object command) throws IOException {
         synchronized(writeMutex) {
             return next.request(command);
         }
     }
     
-    public Response request(Command command,int timeout) throws IOException {
+    public Object request(Object command,int timeout) throws IOException {
         synchronized(writeMutex){
             return next.request(command,timeout);
         }

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/ResponseCorrelator.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/ResponseCorrelator.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/ResponseCorrelator.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/ResponseCorrelator.java Sat Oct 14 20:31:28 2006
@@ -53,13 +53,15 @@
         this.sequenceGenerator = sequenceGenerator;
     }
 
-    public void oneway(Command command) throws IOException {
+    public void oneway(Object o) throws IOException {
+    	Command command = (Command) o;
         command.setCommandId(sequenceGenerator.getNextSequenceId());
         command.setResponseRequired(false);
         next.oneway(command);
     }
 
-    public FutureResponse asyncRequest(Command command, ResponseCallback responseCallback) throws IOException {
+    public FutureResponse asyncRequest(Object o, ResponseCallback responseCallback) throws IOException {
+    	Command command = (Command) o;
         command.setCommandId(sequenceGenerator.getNextSequenceId());
         command.setResponseRequired(true);
         FutureResponse future = new FutureResponse(responseCallback);
@@ -68,17 +70,18 @@
         return future;
     }
     
-    public Response request(Command command) throws IOException { 
+    public Object request(Object command) throws IOException { 
         FutureResponse response = asyncRequest(command, null);
         return response.getResult();
     }
     
-    public Response request(Command command,int timeout) throws IOException {
+    public Object request(Object command,int timeout) throws IOException {
         FutureResponse response = asyncRequest(command, null);
         return response.getResult(timeout);
     }
     
-    public void onCommand(Command command) {
+    public void onCommand(Object o) {
+    	Command command = (Command) o;
         boolean debug = log.isDebugEnabled();
         if( command.isResponse() ) {
             Response response = (Response) command;

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/Transport.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/Transport.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/Transport.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/Transport.java Sat Oct 14 20:31:28 2006
@@ -18,8 +18,6 @@
 package org.apache.activemq.transport;
 
 import org.apache.activemq.Service;
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.Response;
 
 import java.io.IOException;
 
@@ -36,7 +34,7 @@
      * @param command 
      * @throws IOException 
      */
-    public void oneway(Command command) throws IOException;
+    public void oneway(Object command) throws IOException;
 
     /**
      * An asynchronous request response where the Receipt will be returned
@@ -48,7 +46,7 @@
      * @return the FutureResponse
      * @throws IOException 
      */
-    public FutureResponse asyncRequest(Command command, ResponseCallback responseCallback) throws IOException;
+    public FutureResponse asyncRequest(Object command, ResponseCallback responseCallback) throws IOException;
     
     /**
      * A synchronous request response
@@ -56,7 +54,7 @@
      * @return the response
      * @throws IOException 
      */
-    public Response request(Command command) throws IOException;
+    public Object request(Object command) throws IOException;
 
     /**
      * A synchronous request response
@@ -65,8 +63,45 @@
      * @return the repsonse or null if timeout
      * @throws IOException 
      */
-    public Response request(Command command, int timeout) throws IOException;
+    public Object request(Object command, int timeout) throws IOException;
 
+    
+//    /**
+//     * A one way asynchronous send
+//     * @param command 
+//     * @throws IOException 
+//     */
+//    public void oneway(Command command) throws IOException;
+//
+//    /**
+//     * An asynchronous request response where the Receipt will be returned
+//     * in the future.  If responseCallback is not null, then it will be called
+//     * when the response has been completed.
+//     * 
+//     * @param command 
+//     * @param responseCallback TODO
+//     * @return the FutureResponse
+//     * @throws IOException 
+//     */
+//    public FutureResponse asyncRequest(Command command, ResponseCallback responseCallback) throws IOException;
+//    
+//    /**
+//     * A synchronous request response
+//     * @param command 
+//     * @return the response
+//     * @throws IOException 
+//     */
+//    public Response request(Command command) throws IOException;
+//
+//    /**
+//     * A synchronous request response
+//     * @param command 
+//     * @param timeout 
+//     * @return the repsonse or null if timeout
+//     * @throws IOException 
+//     */
+//    public Response request(Command command, int timeout) throws IOException;
+    
     /**
      * Returns the current transport listener
      * @return 

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFilter.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFilter.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFilter.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFilter.java Sat Oct 14 20:31:28 2006
@@ -18,8 +18,6 @@
 package org.apache.activemq.transport;
 
 import java.io.IOException;
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.Response;
 /**
  * @version $Revision: 1.5 $
  */
@@ -63,7 +61,7 @@
         next.stop();
     }
 
-    public void onCommand(Command command){
+    public void onCommand(Object command){
         transportListener.onCommand(command);
     }
 
@@ -78,19 +76,19 @@
         return next.toString();
     }
 
-    public void oneway(Command command) throws IOException{
+    public void oneway(Object command) throws IOException{
         next.oneway(command);
     }
 
-    public FutureResponse asyncRequest(Command command,ResponseCallback responseCallback) throws IOException{
+    public FutureResponse asyncRequest(Object command,ResponseCallback responseCallback) throws IOException{
         return next.asyncRequest(command,null);
     }
 
-    public Response request(Command command) throws IOException{
+    public Object request(Object command) throws IOException{
         return next.request(command);
     }
 
-    public Response request(Command command,int timeout) throws IOException{
+    public Object request(Object command,int timeout) throws IOException{
         return next.request(command,timeout);
     }
 

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportListener.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportListener.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportListener.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportListener.java Sat Oct 14 20:31:28 2006
@@ -19,7 +19,6 @@
 
 import java.io.IOException;
 
-import org.apache.activemq.command.Command;
 
 /**
  * An asynchronous listener of commands
@@ -32,7 +31,7 @@
      * called to process a command
      * @param command
      */
-    public void onCommand(Command command);
+    public void onCommand(Object command);
     /**
      * An unrecoverable exception has occured on the transport
      * @param error

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportLogger.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportLogger.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportLogger.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportLogger.java Sat Oct 14 20:31:28 2006
@@ -19,8 +19,6 @@
 
 import java.io.IOException;
 
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.Response;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -46,40 +44,36 @@
         this.log = log;
     }
 
-    public Response request(Command command) throws IOException {
+    public Object request(Object command) throws IOException {
         log.debug("SENDING REQUEST: "+command);
-    	Response rc = super.request(command);
+    	Object rc = super.request(command);
         log.debug("GOT RESPONSE: "+rc);
     	return rc;
     }
     
-    public Response request(Command command, int timeout) throws IOException {
+    public Object request(Object command, int timeout) throws IOException {
         log.debug("SENDING REQUEST: "+command);
-    	Response rc = super.request(command, timeout);
+        Object rc = super.request(command, timeout);
         log.debug("GOT RESPONSE: "+rc);
     	return rc;
     }
     
-    public FutureResponse asyncRequest(Command command, ResponseCallback responseCallback) throws IOException {
+    public FutureResponse asyncRequest(Object command, ResponseCallback responseCallback) throws IOException {
         log.debug("SENDING ASNYC REQUEST: "+command);
     	FutureResponse rc = next.asyncRequest(command, responseCallback);
     	return rc;
     }
     
-    public void oneway(Command command) throws IOException {
+    public void oneway(Object command) throws IOException {
         if( log.isDebugEnabled() ) {
             log.debug("SENDING: "+command);
         }
         next.oneway(command);
     }
     
-    public void onCommand(Command command) {
+    public void onCommand(Object command) {
         if( log.isDebugEnabled() ) {
-        	if( command.getFrom()!=null ) {
-                log.debug("RECEIVED: from: "+ command.getFrom() + " : " + command);
-        	} else {
-                log.debug("RECEIVED: " + command);
-        	}
+            log.debug("RECEIVED: " + command);
         }
         getTransportListener().onCommand(command);
     }

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportSupport.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportSupport.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportSupport.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportSupport.java Sat Oct 14 20:31:28 2006
@@ -17,16 +17,12 @@
  */
 package org.apache.activemq.transport;
 
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.RemoveInfo;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.command.ShutdownInfo;
+import java.io.IOException;
+
 import org.apache.activemq.util.ServiceSupport;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-import java.io.IOException;
-
 /**
  * A useful base class for transport implementations.
  * 
@@ -67,22 +63,22 @@
         return null;
     }
 
-    public FutureResponse asyncRequest(Command command, ResponseCallback responseCallback) throws IOException {
+    public FutureResponse asyncRequest(Object command, ResponseCallback responseCallback) throws IOException {
         throw new AssertionError("Unsupported Method");
     }
 
-    public Response request(Command command) throws IOException {
+    public Object request(Object command) throws IOException {
         throw new AssertionError("Unsupported Method");
     }
     
-    public Response request(Command command,int timeout) throws IOException {
+    public Object request(Object command,int timeout) throws IOException {
         throw new AssertionError("Unsupported Method");
     }
 
     /**
      * Process the inbound command
      */
-    public void doConsume(Command command) {
+    public void doConsume(Object command) {
         if (command != null) {
             if (transportListener != null) {
                 transportListener.onCommand(command);
@@ -102,7 +98,7 @@
         }
     }
 
-    protected void checkStarted(Command command) throws IOException {
+    protected void checkStarted() throws IOException {
         if (!isStarted()) {
 			throw new IOException("The transport is not running.");
         }

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/WireFormatNegotiator.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/WireFormatNegotiator.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/WireFormatNegotiator.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/WireFormatNegotiator.java Sat Oct 14 20:31:28 2006
@@ -22,7 +22,6 @@
 
 import org.apache.activemq.command.Command;
 import org.apache.activemq.command.WireFormatInfo;
-import org.apache.activemq.command.ExceptionResponse;
 import org.apache.activemq.openwire.OpenWireFormat;
 import org.apache.activemq.util.IOExceptionSupport;
 import org.apache.commons.logging.Log;
@@ -83,7 +82,7 @@
         readyCountDownLatch.countDown();
     }
     
-    public void oneway(Command command) throws IOException {
+    public void oneway(Object command) throws IOException {
         try {
             if( !readyCountDownLatch.await(negotiateTimeout, TimeUnit.MILLISECONDS) ) 
             	throw new IOException("Wire format negociation timeout: peer did not send his wire format.");
@@ -95,7 +94,8 @@
     }
 
  
-    public void onCommand(Command command) {
+    public void onCommand(Object o) {
+    	Command command = (Command) o;
         if( command.isWireFormatInfo() ) {
             WireFormatInfo info = (WireFormatInfo) command;
             if (log.isDebugEnabled()) {

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java Sat Oct 14 20:31:28 2006
@@ -85,7 +85,8 @@
     
     TransportListener createTransportListener() {
     	return new TransportListener() {
-	        public void onCommand(Command command) {
+	        public void onCommand(Object o) {
+            	Command command = (Command) o;
 	            if (command == null) {
 	                return;
 	            }
@@ -340,7 +341,8 @@
         this.randomize=randomize;
     }
 
-    public void oneway(Command command) throws IOException {
+    public void oneway(Object o) throws IOException {
+    	Command command = (Command) o;
         Exception error = null;
         try {
 
@@ -429,15 +431,15 @@
         }
     }
 
-    public FutureResponse asyncRequest(Command command, ResponseCallback responseCallback) throws IOException {
+    public FutureResponse asyncRequest(Object command, ResponseCallback responseCallback) throws IOException {
         throw new AssertionError("Unsupported Method");
     }
 
-    public Response request(Command command) throws IOException {
+    public Object request(Object command) throws IOException {
         throw new AssertionError("Unsupported Method");
     }
     
-    public Response request(Command command,int timeout) throws IOException {
+    public Object request(Object command,int timeout) throws IOException {
         throw new AssertionError("Unsupported Method");
     }
 

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java Sat Oct 14 20:31:28 2006
@@ -107,7 +107,8 @@
             this.uri=uri;
         }
 
-        public void onCommand(Command command) {
+        public void onCommand(Object o) {
+        	Command command = (Command) o;
             if (command.isResponse()) {
                 Integer id = new Integer(((Response) command).getCorrelationId());
                 RequestCounter rc = (RequestCounter) requestMap.get(id);
@@ -331,7 +332,8 @@
         this.maxReconnectAttempts = maxReconnectAttempts;
     }
 
-    public void oneway(Command command) throws IOException {
+    public void oneway(Object o) throws IOException {
+    	final Command command = (Command) o;
         try {
             synchronized (reconnectMutex) {
                 
@@ -414,15 +416,15 @@
         return true;
     }
 
-    public FutureResponse asyncRequest(Command command, ResponseCallback responseCallback) throws IOException {
+    public FutureResponse asyncRequest(Object command, ResponseCallback responseCallback) throws IOException {
         throw new AssertionError("Unsupported Method");
     }
 
-    public Response request(Command command) throws IOException {
+    public Object request(Object command) throws IOException {
         throw new AssertionError("Unsupported Method");
     }
     
-    public Response request(Command command,int timeout) throws IOException {
+    public Object request(Object command,int timeout) throws IOException {
         throw new AssertionError("Unsupported Method");
     }
 

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/mock/MockTransport.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/mock/MockTransport.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/mock/MockTransport.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/mock/MockTransport.java Sat Oct 14 20:31:28 2006
@@ -19,8 +19,6 @@
 
 import java.io.IOException;
 
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.Response;
 import org.apache.activemq.transport.DefaultTransportListener;
 import org.apache.activemq.transport.FutureResponse;
 import org.apache.activemq.transport.ResponseCallback;
@@ -71,7 +69,7 @@
         next.stop();
     }    
 
-    synchronized public void onCommand(Command command) {
+    synchronized public void onCommand(Object command) {
         transportListener.onCommand(command);
     }
 
@@ -93,19 +91,19 @@
         return next.toString();
     }
 
-    synchronized public void oneway(Command command) throws IOException {
+    synchronized public void oneway(Object command) throws IOException {
         next.oneway(command);
     }
 
-    synchronized public FutureResponse asyncRequest(Command command, ResponseCallback responseCallback) throws IOException {
+    synchronized public FutureResponse asyncRequest(Object command, ResponseCallback responseCallback) throws IOException {
         return next.asyncRequest(command, null);
     }
 
-    synchronized public Response request(Command command) throws IOException {
+    synchronized public Object request(Object command) throws IOException {
         return next.request(command);
     }
     
-    public Response request(Command command,int timeout) throws IOException {
+    public Object request(Object command,int timeout) throws IOException {
         return next.request(command, timeout);
     }
 

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/reliable/ReliableTransport.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/reliable/ReliableTransport.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/reliable/ReliableTransport.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/reliable/ReliableTransport.java Sat Oct 14 20:31:28 2006
@@ -17,6 +17,10 @@
  */
 package org.apache.activemq.transport.reliable;
 
+import java.io.IOException;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
 import org.apache.activemq.command.Command;
 import org.apache.activemq.command.ReplayCommand;
 import org.apache.activemq.command.Response;
@@ -25,14 +29,9 @@
 import org.apache.activemq.transport.ResponseCorrelator;
 import org.apache.activemq.transport.Transport;
 import org.apache.activemq.transport.udp.UdpTransport;
-import org.apache.activemq.util.IntSequenceGenerator;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-import java.io.IOException;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
 /**
  * This interceptor deals with out of order commands together with being able to
  * handle dropped commands and the re-requesting dropped commands.
@@ -78,7 +77,8 @@
         }
     }
 
-    public Response request(Command command) throws IOException {
+    public Object request(Object o) throws IOException {
+    	final Command command = (Command) o;
         FutureResponse response = asyncRequest(command, null);
         while (true) {
             Response result = response.getResult(requestTimeout);
@@ -89,7 +89,8 @@
         }
     }
 
-    public Response request(Command command, int timeout) throws IOException {
+    public Object request(Object o, int timeout) throws IOException {
+    	final Command command = (Command) o;
         FutureResponse response = asyncRequest(command, null);
         while (timeout > 0) {
             int time = timeout;
@@ -106,7 +107,8 @@
         return response.getResult(0);
     }
 
-    public void onCommand(Command command) {
+    public void onCommand(Object o) {
+    	Command command = (Command) o;
         // lets pass wireformat through
         if (command.isWireFormatInfo()) {
             super.onCommand(command);

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompTransportFilter.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompTransportFilter.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompTransportFilter.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompTransportFilter.java Sat Oct 14 20:31:28 2006
@@ -50,15 +50,16 @@
         this.protocolConverter = new ProtocolConverter(this, translator);
     }
 
-	public void oneway(Command command) throws IOException {
+	public void oneway(Object o) throws IOException {
         try {
+        	final Command command = (Command) o;
         	protocolConverter.onActiveMQCommad(command);
 		} catch (JMSException e) {
 			throw IOExceptionSupport.create(e);
 		}
 	}
 
-	public void onCommand(Command command) {
+	public void onCommand(Object command) {
         try {
         	protocolConverter.onStompCommad((StompFrame) command);
 		} catch (IOException e) {

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java Sat Oct 14 20:31:28 2006
@@ -34,7 +34,6 @@
 import javax.net.SocketFactory;
 
 import org.apache.activemq.Service;
-import org.apache.activemq.command.Command;
 import org.apache.activemq.transport.Transport;
 import org.apache.activemq.transport.TransportThreadSupport;
 import org.apache.activemq.util.IntrospectionSupport;
@@ -113,8 +112,8 @@
     /**
      * A one way asynchronous send
      */
-    public void oneway(Command command) throws IOException {
-        checkStarted(command);
+    public void oneway(Object command) throws IOException {
+        checkStarted();
         wireFormat.marshal(command, dataOut);
         dataOut.flush();
     }
@@ -133,7 +132,7 @@
         log.trace("TCP consumer thread starting");
         while (!isStopped()) {
             try {
-                Command command = (Command) wireFormat.unmarshal(dataIn);
+                Object command = wireFormat.unmarshal(dataIn);
                 doConsume(command);
             }
             catch (SocketTimeoutException e) {

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/ResponseRedirectInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/ResponseRedirectInterceptor.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/ResponseRedirectInterceptor.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/ResponseRedirectInterceptor.java Sat Oct 14 20:31:28 2006
@@ -34,7 +34,8 @@
         this.transport = transport;
     }
 
-    public void onCommand(Command command) {
+    public void onCommand(Object o) {
+    	final Command command = (Command) o;
         // redirect to the endpoint that the last response came from
         Endpoint from = command.getFrom();
         transport.setTargetEndpoint(from);

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransport.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransport.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransport.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransport.java Sat Oct 14 20:31:28 2006
@@ -113,19 +113,19 @@
     /**
      * A one way asynchronous send
      */
-    public void oneway(Command command) throws IOException {
+    public void oneway(Object command) throws IOException {
         oneway(command, targetAddress);
     }
 
     /**
      * A one way asynchronous send to a given address
      */
-    public void oneway(Command command, SocketAddress address) throws IOException {
+    public void oneway(Object command, SocketAddress address) throws IOException {
         if (log.isDebugEnabled()) {
             log.debug("Sending oneway from: " + this + " to target: " + targetAddress + " command: " + command);
         }
-        checkStarted(command);
-        commandChannel.write(command, address);
+        checkStarted();
+        commandChannel.write((Command) command, address);
     }
 
     /**

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportServer.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportServer.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportServer.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportServer.java Sat Oct 14 20:31:28 2006
@@ -17,6 +17,13 @@
  */
 package org.apache.activemq.transport.udp;
 
+import java.io.IOException;
+import java.net.InetSocketAddress;
+import java.net.SocketAddress;
+import java.net.URI;
+import java.util.HashMap;
+import java.util.Map;
+
 import org.apache.activemq.command.BrokerInfo;
 import org.apache.activemq.command.Command;
 import org.apache.activemq.openwire.OpenWireFormat;
@@ -33,13 +40,6 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-import java.io.IOException;
-import java.net.InetSocketAddress;
-import java.net.SocketAddress;
-import java.net.URI;
-import java.util.HashMap;
-import java.util.Map;
-
 /**
  * A UDP based implementation of {@link TransportServer}
  * 
@@ -81,7 +81,8 @@
         log.info("Starting " + this);
 
         configuredTransport.setTransportListener(new TransportListener() {
-            public void onCommand(Command command) {
+            public void onCommand(Object o) {
+            	final Command command = (Command) o;
                 processInboundConnection(command);
             }
 

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransport.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransport.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransport.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransport.java Sat Oct 14 20:31:28 2006
@@ -20,7 +20,6 @@
 import java.util.LinkedList;
 import java.util.List;
 import org.apache.activemq.command.Command;
-import org.apache.activemq.command.Response;
 import org.apache.activemq.thread.Task;
 import org.apache.activemq.thread.TaskRunner;
 import org.apache.activemq.thread.TaskRunnerFactory;
@@ -70,7 +69,7 @@
         this.peer=peer;
     }
 
-    public void oneway(Command command) throws IOException{
+    public void oneway(Object command) throws IOException{
         if(disposed){
             throw new TransportDisposedIOException("Transport disposed.");
         }
@@ -88,7 +87,7 @@
         }
     }
     
-    protected void syncOneWay(Command command){
+    protected void syncOneWay(Object command){
         final TransportListener tl=peer.transportListener;
         prePeerSetQueue=peer.prePeerSetQueue;
         if(tl==null){
@@ -98,7 +97,7 @@
         }
     }
     
-    protected void asyncOneWay(Command command) throws IOException{
+    protected void asyncOneWay(Object command) throws IOException{
         messageQueue=getMessageQueue();
         try{
             messageQueue.put(command);
@@ -109,15 +108,15 @@
         }
     }
 
-    public FutureResponse asyncRequest(Command command,ResponseCallback responseCallback) throws IOException{
+    public FutureResponse asyncRequest(Object command,ResponseCallback responseCallback) throws IOException{
         throw new AssertionError("Unsupported Method");
     }
 
-    public Response request(Command command) throws IOException{
+    public Object request(Object command) throws IOException{
         throw new AssertionError("Unsupported Method");
     }
 
-    public Response request(Command command,int timeout) throws IOException{
+    public Object request(Object command,int timeout) throws IOException{
         throw new AssertionError("Unsupported Method");
     }
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/StubConnection.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/StubConnection.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/StubConnection.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/StubConnection.java Sat Oct 14 20:31:28 2006
@@ -18,6 +18,7 @@
 package org.apache.activemq.broker;
 
 import java.io.IOException;
+
 import org.apache.activemq.Service;
 import org.apache.activemq.command.Command;
 import org.apache.activemq.command.ExceptionResponse;
@@ -30,6 +31,7 @@
 import org.apache.activemq.transport.Transport;
 import org.apache.activemq.util.JMSExceptionSupport;
 import org.apache.activemq.util.ServiceSupport;
+
 import edu.emory.mathcs.backport.java.util.concurrent.BlockingQueue;
 import edu.emory.mathcs.backport.java.util.concurrent.LinkedBlockingQueue;
 
@@ -66,7 +68,7 @@
         };
     }
 
-    protected void dispatch(Command command) throws InterruptedException, IOException {
+    protected void dispatch(Object command) throws InterruptedException, IOException {
         dispatchQueue.put(command);
     }
 
@@ -77,7 +79,7 @@
     public StubConnection(Transport transport) throws Exception {
         this.transport = transport;
         transport.setTransportListener(new DefaultTransportListener() {
-            public void onCommand(Command command) {
+            public void onCommand(Object command) {
                 try {
                     if (command.getClass() == ShutdownInfo.class) {
                         shuttingDown = true;
@@ -135,7 +137,7 @@
             return response;
         }
         else if (transport != null) {
-            Response response = transport.request(command);
+            Response response = (Response) transport.request(command);
             if (response != null && response.isException()) {
                 ExceptionResponse er = (ExceptionResponse) response;
                 throw JMSExceptionSupport.create(er.getException());

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/StubTransport.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/StubTransport.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/StubTransport.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/StubTransport.java Sat Oct 14 20:31:28 2006
@@ -20,7 +20,6 @@
 import edu.emory.mathcs.backport.java.util.Queue;
 import edu.emory.mathcs.backport.java.util.concurrent.ConcurrentLinkedQueue;
 
-import org.apache.activemq.command.Command;
 import org.apache.activemq.util.ServiceStopper;
 
 import java.io.IOException;
@@ -39,7 +38,7 @@
     protected void doStart() throws Exception {
     }
 
-    public void oneway(Command command) throws IOException {
+    public void oneway(Object command) throws IOException {
         queue.add(command);
     }
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/StubTransportListener.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/StubTransportListener.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/StubTransportListener.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/StubTransportListener.java Sat Oct 14 20:31:28 2006
@@ -20,7 +20,6 @@
 import edu.emory.mathcs.backport.java.util.Queue;
 import edu.emory.mathcs.backport.java.util.concurrent.ConcurrentLinkedQueue;
 
-import org.apache.activemq.command.Command;
 
 import java.io.IOException;
 
@@ -41,7 +40,7 @@
         return exceptions;
     }
 
-    public void onCommand(Command command) {
+    public void onCommand(Object command) {
         commands.add(command);
     }
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/BadConnectionTest.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/BadConnectionTest.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/BadConnectionTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/BadConnectionTest.java Sat Oct 14 20:31:28 2006
@@ -23,7 +23,6 @@
 import junit.framework.TestCase;
 
 import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.Command;
 import org.apache.activemq.transport.Transport;
 import org.apache.activemq.transport.TransportFactory;
 import org.apache.activemq.transport.TransportListener;
@@ -58,7 +57,7 @@
         transport = createTransport();
         transport.setTransportListener(new TransportListener() {
 
-            public void onCommand(Command command) {
+            public void onCommand(Object command) {
             }
 
             public void onException(IOException error) {

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/fanout/FanoutTransportBrokerTest.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/fanout/FanoutTransportBrokerTest.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/fanout/FanoutTransportBrokerTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/fanout/FanoutTransportBrokerTest.java Sat Oct 14 20:31:28 2006
@@ -28,7 +28,6 @@
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.ActiveMQQueue;
 import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.command.Command;
 import org.apache.activemq.command.ConnectionInfo;
 import org.apache.activemq.command.ConsumerInfo;
 import org.apache.activemq.command.ProducerInfo;
@@ -159,7 +158,7 @@
         // Slip in a new transport filter after the MockTransport
         MockTransport mt = (MockTransport) connection3.getTransport().narrow(MockTransport.class);
         mt.install(new TransportFilter(mt.getNext()) {
-            public void oneway(Command command) throws IOException {
+            public void oneway(Object command) throws IOException {
                 log.info("Dropping: "+command);
                 // just eat it! to simulate a recent failure.
             }

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/InactivityMonitorTest.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/InactivityMonitorTest.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/InactivityMonitorTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/InactivityMonitorTest.java Sat Oct 14 20:31:28 2006
@@ -21,7 +21,6 @@
 import java.net.URISyntaxException;
 
 import org.apache.activemq.CombinationTestSupport;
-import org.apache.activemq.command.Command;
 import org.apache.activemq.command.WireFormatInfo;
 import org.apache.activemq.openwire.OpenWireFormat;
 import org.apache.activemq.transport.Transport;
@@ -65,7 +64,7 @@
     private void startClient() throws Exception, URISyntaxException {
         clientTransport = TransportFactory.connect(new URI("tcp://localhost:61616?trace=true&wireFormat.maxInactivityDuration=1000"));
         clientTransport.setTransportListener(new TransportListener() {
-            public void onCommand(Command command) {
+            public void onCommand(Object command) {
                 clientReceiveCount.incrementAndGet();
                 if( clientRunOnCommand !=null ) {
                     clientRunOnCommand.run();
@@ -117,7 +116,7 @@
             log.info("["+getName()+"] Server Accepted a Connection");
             serverTransport = transport;
             serverTransport.setTransportListener(new TransportListener() {
-                public void onCommand(Command command) {
+                public void onCommand(Object command) {
                     serverReceiveCount.incrementAndGet();
                     if( serverRunOnCommand !=null ) {
                         serverRunOnCommand.run();
@@ -151,7 +150,7 @@
         // this should simulate a client hang.
         clientTransport = new TcpTransport(new OpenWireFormat(), SocketFactory.getDefault(), new URI("tcp://localhost:61616"), null);
         clientTransport.setTransportListener(new TransportListener() {
-            public void onCommand(Command command) {
+            public void onCommand(Object command) {
                 clientReceiveCount.incrementAndGet();
                 if( clientRunOnCommand !=null ) {
                     clientRunOnCommand.run();

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTestSupport.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTestSupport.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTestSupport.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTestSupport.java Sat Oct 14 20:31:28 2006
@@ -169,7 +169,7 @@
 
         producer = createProducer();
         producer.setTransportListener(new TransportListener() {
-            public void onCommand(Command command) {
+            public void onCommand(Object command) {
                 log.info("Producer received: " + command);
             }
 
@@ -200,7 +200,8 @@
         }
     }
 
-    public void onCommand(Command command) {
+    public void onCommand(Object o) {
+    	final Command command = (Command) o;
         if (command instanceof WireFormatInfo) {
             log.info("Got WireFormatInfo: " + command);
         }

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTransportUsingServerTest.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTransportUsingServerTest.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTransportUsingServerTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTransportUsingServerTest.java Sat Oct 14 20:31:28 2006
@@ -40,7 +40,7 @@
         expected.setSelector("Edam");
         expected.setResponseRequired(true);
         log.info("About to send: " + expected);
-        Response response = producer.request(expected, 2000);
+        Response response = (Response) producer.request(expected, 2000);
 
         log.info("Received: " + response);
         assertNotNull("Received a response", response);

Modified: incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/BlockingQueueTransport.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/BlockingQueueTransport.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/BlockingQueueTransport.java (original)
+++ incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/BlockingQueueTransport.java Sat Oct 14 20:31:28 2006
@@ -21,7 +21,6 @@
 import edu.emory.mathcs.backport.java.util.concurrent.BlockingQueue;
 import edu.emory.mathcs.backport.java.util.concurrent.TimeUnit;
 
-import org.apache.activemq.command.Command;
 import org.apache.activemq.transport.TransportSupport;
 import org.apache.activemq.util.ServiceStopper;
 
@@ -47,7 +46,7 @@
         return queue;
     }
 
-    public void oneway(Command command) throws IOException {
+    public void oneway(Object command) throws IOException {
         try {
             boolean success = queue.offer(command, MAX_TIMEOUT, TimeUnit.MILLISECONDS);
             if (!success)

Modified: incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java (original)
+++ incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java Sat Oct 14 20:31:28 2006
@@ -22,8 +22,6 @@
 import java.io.InterruptedIOException;
 import java.net.URI;
 
-import org.apache.activemq.command.Command;
-import org.apache.activemq.command.Response;
 import org.apache.activemq.transport.FutureResponse;
 import org.apache.activemq.transport.util.TextWireFormat;
 import org.apache.activemq.util.ByteArrayInputStream;
@@ -62,11 +60,11 @@
         super(wireFormat, remoteUrl);
     }
 
-    public FutureResponse asyncRequest(Command command) throws IOException {
+    public FutureResponse asyncRequest(Object command) throws IOException {
         return null;
     }
 
-    public void oneway(Command command) throws IOException {
+    public void oneway(Object command) throws IOException {
     	
     	if( isStopped() ) {
     		throw new IOException("stopped.");
@@ -96,7 +94,7 @@
         }
     }
 
-    public Response request(Command command) throws IOException {
+    public Object request(Object command) throws IOException {
         return null;
     }
 
@@ -131,7 +129,7 @@
                 else {
 //                    checkSession(httpMethod);
                 	DataInputStream stream = new DataInputStream(httpMethod.getResponseBodyAsStream());                    
-                	Command command = (Command) getTextWireFormat().unmarshal(stream);                    
+                	Object command = (Object) getTextWireFormat().unmarshal(stream);                    
                     if (command == null) {
                         log.warn("Received null command from url: " + remoteUrl);
                     } else {

Modified: incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransport.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransport.java?view=diff&rev=464110&r1=464109&r2=464110
==============================================================================
--- incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransport.java (original)
+++ incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransport.java Sat Oct 14 20:31:28 2006
@@ -53,7 +53,8 @@
         url = new URL(remoteUrl.toString());
     }
 
-    public void oneway(Command command) throws IOException {
+    public void oneway(Object o) throws IOException {
+    	final Command command = (Command) o;
         try {
             if (command.getDataStructureType()==ConnectionInfo.DATA_STRUCTURE_TYPE) {
                 boolean startGetThread = clientID==null;



Mime
View raw message