1 18 package org.apache.activemq.broker; 19 20 import java.net.URI ; 21 import java.util.Set ; 22 import org.apache.activemq.Service; 23 import org.apache.activemq.broker.region.Destination; 24 import org.apache.activemq.broker.region.Region; 25 import org.apache.activemq.broker.region.policy.PendingDurableSubscriberMessageStoragePolicy; 26 import org.apache.activemq.command.ActiveMQDestination; 27 import org.apache.activemq.command.BrokerId; 28 import org.apache.activemq.command.BrokerInfo; 29 import org.apache.activemq.command.ConnectionInfo; 30 import org.apache.activemq.command.DestinationInfo; 31 import org.apache.activemq.command.MessageDispatch; 32 import org.apache.activemq.command.MessageDispatchNotification; 33 import org.apache.activemq.command.MessagePull; 34 import org.apache.activemq.command.ProducerInfo; 35 import org.apache.activemq.command.Response; 36 import org.apache.activemq.command.SessionInfo; 37 import org.apache.activemq.command.TransactionId; 38 import org.apache.activemq.kaha.Store; 39 40 47 public interface Broker extends Region, Service { 48 49 54 public Broker getAdaptor(Class type); 55 56 59 public BrokerId getBrokerId(); 60 61 64 public String getBrokerName(); 65 66 69 public void addBroker(Connection connection, BrokerInfo info); 70 71 76 public void removeBroker(Connection connection,BrokerInfo info); 77 78 79 83 public void addConnection(ConnectionContext context, ConnectionInfo info) throws Exception ; 84 85 92 public void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error) throws Exception ; 93 94 100 public void addSession(ConnectionContext context, SessionInfo info) throws Exception ; 101 102 108 public void removeSession(ConnectionContext context, SessionInfo info) throws Exception ; 109 110 115 public void addProducer(ConnectionContext context, ProducerInfo info) throws Exception ; 116 117 122 public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception ; 123 124 128 public Connection[] getClients() throws Exception ; 129 130 134 public ActiveMQDestination[] getDestinations() throws Exception ; 135 136 140 public TransactionId[] getPreparedTransactions(ConnectionContext context) throws Exception ; 141 142 148 public void beginTransaction(ConnectionContext context, TransactionId xid) throws Exception ; 149 150 157 public int prepareTransaction(ConnectionContext context, TransactionId xid) throws Exception ; 158 159 165 166 public void rollbackTransaction(ConnectionContext context, TransactionId xid) throws Exception ; 167 168 175 public void commitTransaction(ConnectionContext context, TransactionId xid, boolean onePhase) throws Exception ; 176 177 180 public void forgetTransaction(ConnectionContext context, TransactionId transactionId) throws Exception ; 181 182 186 BrokerInfo[] getPeerBrokerInfos(); 187 188 189 193 public void processDispatch(MessageDispatch messageDispatch); 194 195 198 public boolean isSlaveBroker(); 199 200 203 public boolean isStopped(); 204 205 208 public Set getDurableDestinations(); 209 210 216 public void addDestinationInfo(ConnectionContext context, DestinationInfo info) throws Exception ; 217 218 219 225 public void removeDestinationInfo(ConnectionContext context, DestinationInfo info) throws Exception ; 226 227 228 231 public boolean isFaultTolerantConfiguration(); 232 233 236 public abstract ConnectionContext getAdminConnectionContext(); 237 238 242 public abstract void setAdminConnectionContext(ConnectionContext adminConnectionContext); 243 244 247 public Store getTempDataStore(); 248 249 252 public URI getVmConnectorURI(); 253 } 254 | Popular Tags |