activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r784243 - in /activemq/sandbox/activemq-flow: activemq-broker/src/main/java/org/apache/activemq/apollo/broker/ activemq-broker/src/main/java/org/apache/activemq/apollo/jaxb/ activemq-broker/src/test/java/org/apache/activemq/apollo/jaxb/ act...
Date Fri, 12 Jun 2009 19:26:08 GMT
Author: chirino
Date: Fri Jun 12 19:26:07 2009
New Revision: 784243

URL: http://svn.apache.org/viewvc?rev=784243&view=rev
Log:
renaming MessageBroker to the simpler Broker

Added:
    activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/Broker.java
      - copied, changed from r784236, activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/MessageBroker.java
    activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/jaxb/BrokerXml.java
      - copied, changed from r784238, activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/jaxb/Broker.java
Removed:
    activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/MessageBroker.java
    activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/jaxb/Broker.java
Modified:
    activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/BrokerConnection.java
    activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/BrokerFactory.java
    activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/BrokerQueueStore.java
    activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/VirtualHost.java
    activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/jaxb/JAXBBrokerFactory.java
    activemq/sandbox/activemq-flow/activemq-broker/src/test/java/org/apache/activemq/apollo/jaxb/JAXBConfigTest.java
    activemq/sandbox/activemq-flow/activemq-broker/src/test/java/org/apache/activemq/broker/BrokerTestBase.java
    activemq/sandbox/activemq-flow/activemq-broker/src/test/java/org/apache/activemq/broker/SharedQueueTest.java
    activemq/sandbox/activemq-flow/activemq-openwire/src/test/java/org/apache/activemq/perf/broker/SharedQueuePerfTest.java

Copied: activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/Broker.java
(from r784236, activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/MessageBroker.java)
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/Broker.java?p2=activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/Broker.java&p1=activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/MessageBroker.java&r1=784236&r2=784243&rev=784243&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/MessageBroker.java
(original)
+++ activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/Broker.java
Fri Jun 12 19:26:07 2009
@@ -32,7 +32,7 @@
 import org.apache.activemq.transport.TransportFactory;
 import org.apache.activemq.transport.TransportServer;
 
-public class MessageBroker implements TransportAcceptListener {
+public class Broker implements TransportAcceptListener {
 
     public static final int MAX_USER_PRIORITY = 10;
     public static final int MAX_PRIORITY = MAX_USER_PRIORITY + 1;

Modified: activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/BrokerConnection.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/BrokerConnection.java?rev=784243&r1=784242&r2=784243&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/BrokerConnection.java
(original)
+++ activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/BrokerConnection.java
Fri Jun 12 19:26:07 2009
@@ -26,7 +26,7 @@
 
 public class BrokerConnection extends Connection {
     
-    protected MessageBroker broker;
+    protected Broker broker;
     private ProtocolHandler protocolHandler;
 
     public BrokerConnection() {
@@ -41,11 +41,11 @@
         });
     }
     
-    public MessageBroker getBroker() {
+    public Broker getBroker() {
         return broker;
     }
 
-    public void setBroker(MessageBroker broker) {
+    public void setBroker(Broker broker) {
         this.broker = broker;
     }
     

Modified: activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/BrokerFactory.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/BrokerFactory.java?rev=784243&r1=784242&r2=784243&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/BrokerFactory.java
(original)
+++ activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/BrokerFactory.java
Fri Jun 12 19:26:07 2009
@@ -28,7 +28,7 @@
     private static final FactoryFinder BROKER_FACTORY_HANDLER_FINDER = new FactoryFinder("META-INF/services/org/apache/activemq/apollo/broker/");
 
     public interface Handler {
-        MessageBroker createBroker(URI brokerURI) throws Exception;
+        Broker createBroker(URI brokerURI) throws Exception;
     }
 
     
@@ -49,7 +49,7 @@
      * @param brokerURI the URI scheme to configure the broker
      * @throws Exception
      */
-    public static MessageBroker createBroker(URI brokerURI) throws Exception {
+    public static Broker createBroker(URI brokerURI) throws Exception {
         return createBroker(brokerURI, false);
     }
 
@@ -62,12 +62,12 @@
      *                construction
      * @throws Exception
      */
-    public static MessageBroker createBroker(URI brokerURI, boolean startBroker) throws Exception
{
+    public static Broker createBroker(URI brokerURI, boolean startBroker) throws Exception
{
         if (brokerURI.getScheme() == null) {
             throw new IllegalArgumentException("Invalid broker URI, no scheme specified:
" + brokerURI);
         }
         Handler handler = createHandler(brokerURI.getScheme());
-        MessageBroker broker = handler.createBroker(brokerURI);
+        Broker broker = handler.createBroker(brokerURI);
         if (startBroker) {
             broker.start();
         }
@@ -80,7 +80,7 @@
      * @param brokerURI the URI scheme to configure the broker
      * @throws Exception
      */
-    public static MessageBroker createBroker(String brokerURI) throws Exception {
+    public static Broker createBroker(String brokerURI) throws Exception {
         return createBroker(new URI(brokerURI));
     }
 
@@ -93,7 +93,7 @@
      *                construction
      * @throws Exception
      */
-    public static MessageBroker createBroker(String brokerURI, boolean startBroker) throws
Exception {
+    public static Broker createBroker(String brokerURI, boolean startBroker) throws Exception
{
         return createBroker(new URI(brokerURI), startBroker);
     }
 

Modified: activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/BrokerQueueStore.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/BrokerQueueStore.java?rev=784243&r1=784242&r2=784243&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/BrokerQueueStore.java
(original)
+++ activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/BrokerQueueStore.java
Fri Jun 12 19:26:07 2009
@@ -345,7 +345,7 @@
             break;
         }
         case QueueDescriptor.SHARED_PRIORITY: {
-            PrioritySizeLimiter<MessageDelivery> limiter = new PrioritySizeLimiter<MessageDelivery>(DEFAULT_SHARED_QUEUE_SIZE,
DEFAULT_SHARED_QUEUE_RESUME_THRESHOLD, MessageBroker.MAX_PRIORITY);
+            PrioritySizeLimiter<MessageDelivery> limiter = new PrioritySizeLimiter<MessageDelivery>(DEFAULT_SHARED_QUEUE_SIZE,
DEFAULT_SHARED_QUEUE_RESUME_THRESHOLD, Broker.MAX_PRIORITY);
             limiter.setPriorityMapper(PRIORITY_MAPPER);
             limiter.setSizeMapper(SIZE_MAPPER);
             SharedPriorityQueue<Long, MessageDelivery> queue = new SharedPriorityQueue<Long,
MessageDelivery>(name, limiter);

Modified: activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/VirtualHost.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/VirtualHost.java?rev=784243&r1=784242&r2=784243&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/VirtualHost.java
(original)
+++ activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/VirtualHost.java
Fri Jun 12 19:26:07 2009
@@ -32,14 +32,14 @@
 public class VirtualHost implements Service {
 
     final private BrokerQueueStore queueStore;
-    final private MessageBroker broker;
+    final private Broker broker;
     final private HashMap<AsciiBuffer, Queue> queues = new HashMap<AsciiBuffer,
Queue>();
     final private HashMap<String, DurableSubscription> durableSubs = new HashMap<String,
DurableSubscription>();
     private ArrayList<AsciiBuffer> hostNames = new ArrayList<AsciiBuffer>();
     private Router router;
     private boolean started;
 
-    public VirtualHost(MessageBroker broker) {
+    public VirtualHost(Broker broker) {
         this.broker = broker;
         this.router = new Router();
         this.router.setVirtualHost(this);

Copied: activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/jaxb/BrokerXml.java
(from r784238, activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/jaxb/Broker.java)
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/jaxb/BrokerXml.java?p2=activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/jaxb/BrokerXml.java&p1=activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/jaxb/Broker.java&r1=784238&r2=784243&rev=784243&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/jaxb/Broker.java
(original)
+++ activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/jaxb/BrokerXml.java
Fri Jun 12 19:26:07 2009
@@ -2,12 +2,12 @@
 
 import javax.xml.bind.annotation.XmlRootElement;
 
-import org.apache.activemq.apollo.broker.MessageBroker;
+import org.apache.activemq.apollo.broker.Broker;
 
 @XmlRootElement(name="broker")
-public class Broker {
+public class BrokerXml {
 
-	public MessageBroker createMessageBroker() {
+	public Broker createMessageBroker() {
 		return null;
 	}
 

Modified: activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/jaxb/JAXBBrokerFactory.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/jaxb/JAXBBrokerFactory.java?rev=784243&r1=784242&r2=784243&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/jaxb/JAXBBrokerFactory.java
(original)
+++ activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/jaxb/JAXBBrokerFactory.java
Fri Jun 12 19:26:07 2009
@@ -23,13 +23,13 @@
 import javax.xml.bind.Unmarshaller;
 
 import org.apache.activemq.apollo.broker.BrokerFactory;
-import org.apache.activemq.apollo.broker.MessageBroker;
+import org.apache.activemq.apollo.broker.Broker;
 import org.apache.activemq.util.URISupport;
 
 public class JAXBBrokerFactory implements BrokerFactory.Handler {
 
-	public MessageBroker createBroker(URI brokerURI) throws Exception {
-		JAXBContext context = JAXBContext.newInstance(Broker.class);
+	public Broker createBroker(URI brokerURI) throws Exception {
+		JAXBContext context = JAXBContext.newInstance(BrokerXml.class);
 		Unmarshaller unmarshaller = context.createUnmarshaller();
 
 		URL configURL;
@@ -43,8 +43,8 @@
 			configURL = URISupport.changeScheme(brokerURI, scheme).toURL();
 		}		
 		
-		Broker config = (Broker) unmarshaller.unmarshal(configURL);
-		return config.createMessageBroker();
+		BrokerXml xml = (BrokerXml) unmarshaller.unmarshal(configURL);
+		return xml.createMessageBroker();
 	}
 
 

Modified: activemq/sandbox/activemq-flow/activemq-broker/src/test/java/org/apache/activemq/apollo/jaxb/JAXBConfigTest.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-broker/src/test/java/org/apache/activemq/apollo/jaxb/JAXBConfigTest.java?rev=784243&r1=784242&r2=784243&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-broker/src/test/java/org/apache/activemq/apollo/jaxb/JAXBConfigTest.java
(original)
+++ activemq/sandbox/activemq-flow/activemq-broker/src/test/java/org/apache/activemq/apollo/jaxb/JAXBConfigTest.java
Fri Jun 12 19:26:07 2009
@@ -22,7 +22,7 @@
 import junit.framework.TestCase;
 
 import org.apache.activemq.apollo.broker.BrokerFactory;
-import org.apache.activemq.apollo.broker.MessageBroker;
+import org.apache.activemq.apollo.broker.Broker;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.junit.After;
@@ -33,7 +33,7 @@
 
     private static final Log LOG = LogFactory.getLog(JAXBConfigTest.class);
 	
-    MessageBroker broker;
+    Broker broker;
     
 	@Before
 	public void setUp() throws Exception {
@@ -49,7 +49,7 @@
 		
 	}
 
-    protected MessageBroker createBroker() throws Exception {
+    protected Broker createBroker() throws Exception {
     	URI uri = new URI("jaxb:classpath:org/apache/activemq/apollo/jaxb/activemq.xml");
         LOG.info("Loading broker configuration from the classpath with URI: " + uri);
         return BrokerFactory.createBroker(uri);

Modified: activemq/sandbox/activemq-flow/activemq-broker/src/test/java/org/apache/activemq/broker/BrokerTestBase.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-broker/src/test/java/org/apache/activemq/broker/BrokerTestBase.java?rev=784243&r1=784242&r2=784243&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-broker/src/test/java/org/apache/activemq/broker/BrokerTestBase.java
(original)
+++ activemq/sandbox/activemq-flow/activemq-broker/src/test/java/org/apache/activemq/broker/BrokerTestBase.java
Fri Jun 12 19:26:07 2009
@@ -28,7 +28,7 @@
 import junit.framework.TestCase;
 
 import org.apache.activemq.apollo.broker.Destination;
-import org.apache.activemq.apollo.broker.MessageBroker;
+import org.apache.activemq.apollo.broker.Broker;
 import org.apache.activemq.apollo.broker.Router;
 import org.apache.activemq.broker.store.Store;
 import org.apache.activemq.broker.store.StoreFactory;
@@ -81,9 +81,9 @@
     protected MetricAggregator totalProducerRate = new MetricAggregator().name("Aggregate
Producer Rate").unit("items");
     protected MetricAggregator totalConsumerRate = new MetricAggregator().name("Aggregate
Consumer Rate").unit("items");
 
-    protected MessageBroker sendBroker;
-    protected MessageBroker rcvBroker;
-    protected ArrayList<MessageBroker> brokers = new ArrayList<MessageBroker>();
+    protected Broker sendBroker;
+    protected Broker rcvBroker;
+    protected ArrayList<Broker> brokers = new ArrayList<Broker>();
     protected IDispatcher dispatcher;
     protected final AtomicLong msgIdGenerator = new AtomicLong();
     protected final AtomicBoolean stopping = new AtomicBoolean();
@@ -127,7 +127,7 @@
     protected abstract String getRemoteWireFormat();
 
     protected IDispatcher createDispatcher() {
-        return PriorityDispatcher.createPriorityDispatchPool("BrokerDispatcher", MessageBroker.MAX_PRIORITY,
asyncThreadPoolSize);
+        return PriorityDispatcher.createPriorityDispatchPool("BrokerDispatcher", Broker.MAX_PRIORITY,
asyncThreadPoolSize);
     }
 
     public void test_1_1_0() throws Exception {
@@ -474,8 +474,8 @@
 
     abstract protected RemoteProducer createProducer();
 
-    private MessageBroker createBroker(String name, String bindURI, String connectUri) throws
Exception {
-        MessageBroker broker = new MessageBroker();
+    private Broker createBroker(String name, String bindURI, String connectUri) throws Exception
{
+        Broker broker = new Broker();
         broker.setName(name);
         broker.setBindUri(bindURI);
         broker.setConnectUri(connectUri);
@@ -484,7 +484,7 @@
         return broker;
     }
 
-    protected Store createStore(MessageBroker broker) throws Exception {
+    protected Store createStore(Broker broker) throws Exception {
         Store store = null;
         if (USE_KAHA_DB) {
             store = StoreFactory.createStore("kaha-db");
@@ -499,7 +499,7 @@
 
     private void stopServices() throws Exception {
         stopping.set(true);
-        for (MessageBroker broker : brokers) {
+        for (Broker broker : brokers) {
             broker.stop();
         }
         for (RemoteProducer connection : producers) {
@@ -514,7 +514,7 @@
     }
 
     private void startBrokers() throws Exception {
-        for (MessageBroker broker : brokers) {
+        for (Broker broker : brokers) {
             broker.start();
         }
     }

Modified: activemq/sandbox/activemq-flow/activemq-broker/src/test/java/org/apache/activemq/broker/SharedQueueTest.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-broker/src/test/java/org/apache/activemq/broker/SharedQueueTest.java?rev=784243&r1=784242&r2=784243&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-broker/src/test/java/org/apache/activemq/broker/SharedQueueTest.java
(original)
+++ activemq/sandbox/activemq-flow/activemq-broker/src/test/java/org/apache/activemq/broker/SharedQueueTest.java
Fri Jun 12 19:26:07 2009
@@ -23,7 +23,7 @@
 
 import org.apache.activemq.apollo.broker.BrokerDatabase;
 import org.apache.activemq.apollo.broker.BrokerQueueStore;
-import org.apache.activemq.apollo.broker.MessageBroker;
+import org.apache.activemq.apollo.broker.Broker;
 import org.apache.activemq.apollo.broker.MessageDelivery;
 import org.apache.activemq.broker.store.Store;
 import org.apache.activemq.broker.store.StoreFactory;
@@ -48,7 +48,7 @@
     protected ArrayList<IQueue<Long, MessageDelivery>> queues = new ArrayList<IQueue<Long,
MessageDelivery>>();
 
     protected IDispatcher createDispatcher() {
-        return PriorityDispatcher.createPriorityDispatchPool("TestDispatcher", MessageBroker.MAX_PRIORITY,
Runtime.getRuntime().availableProcessors());
+        return PriorityDispatcher.createPriorityDispatchPool("TestDispatcher", Broker.MAX_PRIORITY,
Runtime.getRuntime().availableProcessors());
     }
 
     protected int consumerStartDelay = 0;

Modified: activemq/sandbox/activemq-flow/activemq-openwire/src/test/java/org/apache/activemq/perf/broker/SharedQueuePerfTest.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/test/java/org/apache/activemq/perf/broker/SharedQueuePerfTest.java?rev=784243&r1=784242&r2=784243&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/test/java/org/apache/activemq/perf/broker/SharedQueuePerfTest.java
(original)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/test/java/org/apache/activemq/perf/broker/SharedQueuePerfTest.java
Fri Jun 12 19:26:07 2009
@@ -26,7 +26,7 @@
 
 import org.apache.activemq.apollo.broker.BrokerDatabase;
 import org.apache.activemq.apollo.broker.BrokerQueueStore;
-import org.apache.activemq.apollo.broker.MessageBroker;
+import org.apache.activemq.apollo.broker.Broker;
 import org.apache.activemq.apollo.broker.MessageDelivery;
 import org.apache.activemq.broker.openwire.OpenWireMessageDelivery;
 import org.apache.activemq.broker.store.Store;
@@ -82,9 +82,9 @@
 
     protected IDispatcher createDispatcher() {
         if (THREAD_POOL_SIZE > 1) {
-            return PriorityDispatcher.createPriorityDispatchPool("TestDispatcher", MessageBroker.MAX_PRIORITY,
THREAD_POOL_SIZE);
+            return PriorityDispatcher.createPriorityDispatchPool("TestDispatcher", Broker.MAX_PRIORITY,
THREAD_POOL_SIZE);
         } else {
-            return PriorityDispatcher.createPriorityDispatcher("TestDispatcher", MessageBroker.MAX_PRIORITY);
+            return PriorityDispatcher.createPriorityDispatcher("TestDispatcher", Broker.MAX_PRIORITY);
         }
     }
 



Mime
View raw message