activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r659203 [2/2] - in /activemq/trunk/activemq-core/src: main/java/org/apache/activemq/advisory/ main/java/org/apache/activemq/broker/ main/java/org/apache/activemq/broker/region/ main/java/org/apache/activemq/broker/region/policy/ main/java/o...
Date Thu, 22 May 2008 18:56:04 GMT
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/StubBroker.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/StubBroker.java?rev=659203&r1=659202&r2=659203&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/StubBroker.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/StubBroker.java
Thu May 22 11:56:03 2008
@@ -17,34 +17,10 @@
 
 package org.apache.activemq.broker;
 
-import java.net.URI;
 import java.util.LinkedList;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.activemq.broker.region.Destination;
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.broker.region.Subscription;
-import org.apache.activemq.broker.region.policy.PendingDurableSubscriberMessageStoragePolicy;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.BrokerId;
-import org.apache.activemq.command.BrokerInfo;
 import org.apache.activemq.command.ConnectionInfo;
-import org.apache.activemq.command.ConsumerInfo;
-import org.apache.activemq.command.DestinationInfo;
-import org.apache.activemq.command.Message;
-import org.apache.activemq.command.MessageAck;
-import org.apache.activemq.command.MessageDispatch;
-import org.apache.activemq.command.MessageDispatchNotification;
-import org.apache.activemq.command.MessagePull;
-import org.apache.activemq.command.ProducerInfo;
-import org.apache.activemq.command.RemoveSubscriptionInfo;
-import org.apache.activemq.command.Response;
-import org.apache.activemq.command.SessionInfo;
-import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.kaha.Store;
 
-public class StubBroker implements Broker {
+public class StubBroker extends EmptyBroker {
     public LinkedList<AddConnectionData> addConnectionData = new LinkedList<AddConnectionData>();
     public LinkedList<RemoveConnectionData> removeConnectionData = new LinkedList<RemoveConnectionData>();
 
@@ -78,188 +54,4 @@
         removeConnectionData.add(new RemoveConnectionData(context, info, error));
     }
 
-    // --- Blank Methods, fill in as needed ---
-    public void addBroker(Connection connection, BrokerInfo info) {
-    }
-
-    public void addDestinationInfo(ConnectionContext context, DestinationInfo info) throws
Exception {
-    }
-
-    public void addProducer(ConnectionContext context, ProducerInfo info) throws Exception
{
-    }
-
-    public void addSession(ConnectionContext context, SessionInfo info) throws Exception
{
-    }
-
-    public void beginTransaction(ConnectionContext context, TransactionId xid) throws Exception
{
-    }
-
-    public void commitTransaction(ConnectionContext context, TransactionId xid, boolean onePhase)
throws Exception {
-    }
-
-    public void forgetTransaction(ConnectionContext context, TransactionId transactionId)
throws Exception {
-    }
-
-    public Broker getAdaptor(Class type) {
-        return null;
-    }
-
-    public ConnectionContext getAdminConnectionContext() {
-        return null;
-    }
-
-    public BrokerId getBrokerId() {
-        return null;
-    }
-
-    public String getBrokerName() {
-        return null;
-    }
-
-    public Connection[] getClients() throws Exception {
-        return null;
-    }
-
-    public ActiveMQDestination[] getDestinations() throws Exception {
-        return null;
-    }
-
-    public Set<ActiveMQDestination> getDurableDestinations() {
-        return null;
-    }
-
-    public BrokerInfo[] getPeerBrokerInfos() {
-        return null;
-    }
-
-    public TransactionId[] getPreparedTransactions(ConnectionContext context) throws Exception
{
-        return null;
-    }
-
-    public boolean isFaultTolerantConfiguration() {
-        return false;
-    }
-
-    public boolean isSlaveBroker() {
-        return false;
-    }
-
-    public boolean isStopped() {
-        return false;
-    }
-
-    public int prepareTransaction(ConnectionContext context, TransactionId xid) throws Exception
{
-        return 0;
-    }
-
-    public void preProcessDispatch(MessageDispatch messageDispatch) {
-    }
-
-    public void postProcessDispatch(MessageDispatch messageDispatch) {
-    }
-
-    public void removeBroker(Connection connection, BrokerInfo info) {
-    }
-
-    public void removeDestinationInfo(ConnectionContext context, DestinationInfo info) throws
Exception {
-    }
-
-    public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception
{
-    }
-
-    public void removeSession(ConnectionContext context, SessionInfo info) throws Exception
{
-    }
-
-    public void rollbackTransaction(ConnectionContext context, TransactionId xid) throws
Exception {
-    }
-
-    public void setAdminConnectionContext(ConnectionContext adminConnectionContext) {
-    }
-
-    public void acknowledge(ConsumerBrokerExchange consumerExchange, MessageAck ack) throws
Exception {
-    }
-
-    public Subscription addConsumer(ConnectionContext context, ConsumerInfo info) throws
Exception {
-        return null;
-    }
-
-    public Destination addDestination(ConnectionContext context, ActiveMQDestination destination)
throws Exception {
-        return null;
-    }
-
-    public void gc() {
-    }
-
-    public Map<ActiveMQDestination, Destination> getDestinationMap() {
-        return null;
-    }
-
-    public Set getDestinations(ActiveMQDestination destination) {
-        return null;
-    }
-
-    public Response messagePull(ConnectionContext context, MessagePull pull) throws Exception
{
-        return null;
-    }
-
-    public void processDispatchNotification(MessageDispatchNotification messageDispatchNotification)
throws Exception {
-    }
-
-    public void removeConsumer(ConnectionContext context, ConsumerInfo info) throws Exception
{
-    }
-
-    public void removeDestination(ConnectionContext context, ActiveMQDestination destination,
long timeout) throws Exception {
-    }
-
-    public void removeSubscription(ConnectionContext context, RemoveSubscriptionInfo info)
throws Exception {
-    }
-
-    public void send(ProducerBrokerExchange producerExchange, Message message) throws Exception
{
-    }
-
-    public void start() throws Exception {
-    }
-
-    public void stop() throws Exception {
-    }
-
-    public PendingDurableSubscriberMessageStoragePolicy getPendingDurableSubscriberPolicy()
{
-        return null;
-    }
-
-    public void setPendingDurableSubscriberPolicy(PendingDurableSubscriberMessageStoragePolicy
pendingDurableSubscriberPolicy) {
-    }
-
-    public Store getTempDataStore() {
-        return null;
-    }
-
-    public URI getVmConnectorURI() {
-        return null;
-    }
-
-    public void brokerServiceStarted() {
-    }
-
-    public BrokerService getBrokerService() {
-        return null;
-    }
-
-    public boolean isExpired(MessageReference messageReference) {
-        return false;
-    }
-
-    public void messageExpired(ConnectionContext context, MessageReference messageReference)
{
-    }
-
-    public void sendToDeadLetterQueue(ConnectionContext context, MessageReference messageReference)
{
-    }
-
-    public Broker getRoot() {
-        return this;
-    }
-    
-    public long getBrokerSequenceId() {
-        return -1l;
-    }
 }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/SubscriptionAddRemoveQueueTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/SubscriptionAddRemoveQueueTest.java?rev=659203&r1=659202&r2=659203&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/SubscriptionAddRemoveQueueTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/SubscriptionAddRemoveQueueTest.java
Thu May 22 11:56:03 2008
@@ -307,5 +307,11 @@
             return false;
         }
 
+        public void addDestination(Destination destination) {            
+        }
+
+        public void removeDestination(Destination destination) {            
+        }
+
     }
 }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQMessageTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQMessageTest.java?rev=659203&r1=659202&r2=659203&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQMessageTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQMessageTest.java
Thu May 22 11:56:03 2008
@@ -402,6 +402,10 @@
             public Response visit(CommandVisitor visitor) throws Exception {
                 return null;
             }
+
+            @Override
+            public void clearBody() throws JMSException {                
+            }
         };
 
         msg.setProperty("stringProperty", "string");



Mime
View raw message