diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/BrokerBroadcaster.java b/activemq-core/src/main/java/org/apache/activemq/broker/BrokerBroadcaster.java new file mode 100755 index 0000000000..c7d3a055c5 --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/broker/BrokerBroadcaster.java @@ -0,0 +1,236 @@ +/** + * + * Copyright 2005-2006 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package org.apache.activemq.broker; + +import java.util.ArrayList; +import java.util.List; +import org.apache.activemq.broker.region.Destination; +import org.apache.activemq.command.ActiveMQDestination; +import org.apache.activemq.command.ConnectionInfo; +import org.apache.activemq.command.ConsumerInfo; +import org.apache.activemq.command.Message; +import org.apache.activemq.command.MessageAck; +import org.apache.activemq.command.ProducerInfo; +import org.apache.activemq.command.RemoveSubscriptionInfo; +import org.apache.activemq.command.SessionInfo; +import org.apache.activemq.command.TransactionId; +/** + * Used to add listeners for Broker actions + * + * @version $Revision: 1.10 $ + */ +public class BrokerBroadcaster extends BrokerFilter{ + protected transient volatile Broker[] listeners=new Broker[0]; + + public BrokerBroadcaster(Broker next){ + super(next); + } + + public void acknowledge(ConnectionContext context,MessageAck ack) throws Throwable{ + next.acknowledge(context,ack); + Broker brokers[]=getListeners(); + for(int i=0;i