|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.activemq.capacity.DelegateCapacityMonitor
org.activemq.broker.impl.DefaultBroker
public class DefaultBroker
The default Broker implementation
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.activemq.capacity.CapacityMonitor |
|---|
CapacityMonitor.BasicCapacityMonitor |
| Field Summary | |
|---|---|
protected static Class[] |
NEWINSTANCE_PARAMETER_TYPES
|
protected static String |
PERSISTENCE_ADAPTER_FACTORY
|
protected static String |
PROPERTY_STORE_DIRECTORY
|
| Constructor Summary | |
|---|---|
DefaultBroker(String brokerName)
|
|
DefaultBroker(String brokerName,
MemoryBoundedObjectManager memoryManager)
|
|
DefaultBroker(String brokerName,
PersistenceAdapter persistenceAdapter)
|
|
DefaultBroker(String brokerName,
String cluserName)
|
|
DefaultBroker(String brokerName,
String brokerClusterName,
MemoryBoundedObjectManager memoryManager)
|
|
DefaultBroker(String brokerName,
String brokerClusterName,
PersistenceAdapter persistenceAdapter)
|
|
| Method Summary | |
|---|---|
void |
acknowledgeMessage(BrokerClient client,
MessageAck ack)
Acknowledge consumption of a message by the Message Consumer |
void |
addClient(BrokerClient client,
ConnectionInfo info)
Notification of a new client attempting to connect, which can be rejected if authentication or authorization fails. |
void |
addConsumerInfoListener(ConsumerInfoListener l)
Add a ConsumerInfoListener to the Broker |
void |
addMessageConsumer(BrokerClient client,
ConsumerInfo info)
Add an active message consumer |
void |
addMessageProducer(BrokerClient client,
ProducerInfo info)
Adds a new message producer, which could be rejected due to authorization |
protected void |
checkValid()
|
void |
commitTransaction(BrokerClient client,
ActiveMQXid xid,
boolean onePhase)
Commit an XA Transaction. |
void |
commitTransaction(BrokerClient client,
String transactionId)
commit a transaction |
protected MessageContainerManager[] |
createContainerManagers()
Factory method to create the default container managers |
protected JMSException |
createInstantiateAdapterException(String className,
Throwable e)
|
void |
createMessageContainer(ActiveMQDestination dest)
|
protected PersistenceAdapter |
createPersistenceAdapter()
Factory method to create a default persistence adapter |
void |
deleteSubscription(String clientId,
String subscriberName)
Delete a durable subscriber |
void |
destoryMessageContainer(ActiveMQDestination dest)
|
protected void |
doMessageSend(BrokerClient client,
ActiveMQMessage message)
|
protected void |
fireConsumerInfo(BrokerClient client,
ConsumerInfo info)
|
BrokerAdmin |
getBrokerAdmin()
Get's the admin interface of the broker. |
String |
getBrokerClusterName()
|
protected BrokerContainerImpl |
getBrokerContainer()
|
BrokerInfo |
getBrokerInfo()
|
String |
getBrokerName()
|
Map |
getContainerManagerMap()
|
MessageContainerManager[] |
getContainerManagers()
|
DeadLetterPolicy |
getDeadLetterPolicy()
|
Context |
getDestinationContext(Hashtable environment)
Returns the naming context of the destinations available in this broker |
long |
getMaximumMemoryUsage()
|
MemoryBoundedObjectManager |
getMemoryManager()
|
MessageContainerAdmin |
getMessageContainerAdmin(ActiveMQDestination dest)
|
String |
getName()
Get the name of the CapacityMonitor |
PersistenceAdapter |
getPersistenceAdapter()
|
MessageContainerManager |
getPersistentQueueContainerManager()
|
MessageContainerManager |
getPersistentTopicContainerManager()
|
ActiveMQXid[] |
getPreparedTransactions(BrokerClient client)
Gets the prepared XA transactions. |
TransactionStore |
getPreparedTransactionStore()
|
MemoryBoundedQueueManager |
getQueueManager()
|
RedeliveryPolicy |
getRedeliveryPolicy()
|
SecurityAdapter |
getSecurityAdapter()
Returns the security adapter used to authenticate and authorize access to JMS resources |
protected String |
getStoreDirectory()
|
File |
getTempDir()
Get a temp directory - used for spooling |
TransactionManager |
getTransactionManager()
|
MessageContainerManager |
getTransientQueueContainerManager()
|
MessageContainerManager |
getTransientTopicContainerManager()
|
boolean |
isStarted()
|
MessageContainerAdmin[] |
listMessageContainerAdmin()
|
protected Class |
loadClass(String name,
boolean ignoreErrors)
Tries to load the given class from the current context class loader or class loader which loaded us or return null if the class could not be found |
protected void |
makeDefaultContainerManagers()
|
int |
prepareTransaction(BrokerClient client,
ActiveMQXid xid)
Prepares an XA Transaciton. |
void |
removeClient(BrokerClient client,
ConnectionInfo info)
A hint to the broker that an BrokerClient has stopped This enables the broker to clean-up any outstanding processing that may be outstanding |
void |
removeConsumerInfoListener(ConsumerInfoListener l)
Remove a ConsumerInfoListener from the Broker |
void |
removeMessageConsumer(BrokerClient client,
ConsumerInfo info)
remove an active message consumer |
void |
removeMessageProducer(BrokerClient client,
ProducerInfo info)
Removes a producer |
void |
rollbackTransaction(BrokerClient client,
ActiveMQXid xid)
Rollback an XA Transaction. |
void |
rollbackTransaction(BrokerClient client,
String transactionId)
rollback a transaction |
void |
sendMessage(BrokerClient client,
ActiveMQMessage message)
send a message to the broker |
void |
sendToDeadLetterQueue(String deadLetterName,
ActiveMQMessage expiredMessage)
Add a message to a dead letter queue |
protected void |
setBrokercontainer(BrokerContainerImpl container)
|
void |
setContainerManagerMap(Map containerManagerMap)
|
void |
setDeadLetterPolicy(DeadLetterPolicy deadLetterPolicy)
set the dead letter policy |
void |
setMaximumMemoryUsage(long maximumMemoryUsage)
|
void |
setPersistenceAdapter(PersistenceAdapter persistenceAdapter)
set the persistence adaptor |
void |
setPreparedTransactionStore(TransactionStore preparedTransactionStore)
|
void |
setRedeliveryPolicy(RedeliveryPolicy redeliveryPolicy)
set the redelivery policy |
void |
setSecurityAdapter(SecurityAdapter securityAdapter)
Sets the security adapter used to authenticate and authorize access to JMS resources |
void |
setTempDir(File tempDir)
|
void |
setTransactionManager(TransactionManager transactionManager)
|
void |
start()
Start this Service |
void |
startTransaction(BrokerClient client,
ActiveMQXid xid)
Starts an XA Transaction. |
void |
startTransaction(BrokerClient client,
String transactionId)
Start a transaction. |
void |
stop()
stop this Service |
String |
toString()
|
protected PersistenceAdapter |
tryCreatePersistenceAdapter(String className,
File directory,
boolean ignoreErrors)
|
protected void |
validateConsumer(ConsumerInfo info)
Ensures the consumer is valid, throwing a meaningful exception if not |
| Methods inherited from class org.activemq.capacity.DelegateCapacityMonitor |
|---|
addCapacityEventListener, generateCapacityMonitorEvent, getCurrentCapacity, getCurrentValue, getRoundedCapacity, getRoundingFactor, getValueLimit, removeCapacityEventListener, setCurrentValue, setDelegate, setName, setRoundingFactor, setValueLimit |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.activemq.capacity.CapacityMonitor |
|---|
addCapacityEventListener, generateCapacityMonitorEvent, getCurrentCapacity, getCurrentValue, getRoundedCapacity, getRoundingFactor, getValueLimit, removeCapacityEventListener, setCurrentValue, setName, setRoundingFactor, setValueLimit |
| Field Detail |
|---|
protected static final String PROPERTY_STORE_DIRECTORY
protected static final String PERSISTENCE_ADAPTER_FACTORY
protected static final Class[] NEWINSTANCE_PARAMETER_TYPES
| Constructor Detail |
|---|
public DefaultBroker(String brokerName,
String brokerClusterName,
MemoryBoundedObjectManager memoryManager)
public DefaultBroker(String brokerName,
MemoryBoundedObjectManager memoryManager)
public DefaultBroker(String brokerName,
String cluserName)
public DefaultBroker(String brokerName)
public DefaultBroker(String brokerName,
String brokerClusterName,
PersistenceAdapter persistenceAdapter)
public DefaultBroker(String brokerName,
PersistenceAdapter persistenceAdapter)
| Method Detail |
|---|
public boolean isStarted()
public void start()
throws JMSException
start in interface ServiceJMSException
public void stop()
throws JMSException
stop in interface ServiceJMSException
public void addClient(BrokerClient client,
ConnectionInfo info)
throws JMSException
Broker
addClient in interface BrokerJMSException
public void removeClient(BrokerClient client,
ConnectionInfo info)
throws JMSException
Broker
removeClient in interface BrokerJMSException
public void addMessageProducer(BrokerClient client,
ProducerInfo info)
throws JMSException
Broker
addMessageProducer in interface BrokerJMSException
public void removeMessageProducer(BrokerClient client,
ProducerInfo info)
throws JMSException
Broker
removeMessageProducer in interface BrokerJMSException
public void addMessageConsumer(BrokerClient client,
ConsumerInfo info)
throws JMSException
addMessageConsumer in interface BrokerJMSException
public void removeMessageConsumer(BrokerClient client,
ConsumerInfo info)
throws JMSException
removeMessageConsumer in interface BrokerJMSException
public void sendMessage(BrokerClient client,
ActiveMQMessage message)
throws JMSException
sendMessage in interface BrokerJMSException
public void acknowledgeMessage(BrokerClient client,
MessageAck ack)
throws JMSException
acknowledgeMessage in interface BrokerJMSException
public void deleteSubscription(String clientId,
String subscriberName)
throws JMSException
Broker
deleteSubscription in interface BrokerJMSException - if the subscriber doesn't exist or is still active
public void startTransaction(BrokerClient client,
String transactionId)
throws JMSException
startTransaction in interface BrokerJMSExceptionBroker.startTransaction(org.activemq.broker.BrokerClient, java.lang.String)
public void commitTransaction(BrokerClient client,
String transactionId)
throws JMSException
Broker
commitTransaction in interface BrokerJMSException
public void rollbackTransaction(BrokerClient client,
String transactionId)
throws JMSException
rollbackTransaction in interface BrokerJMSException
public void startTransaction(BrokerClient client,
ActiveMQXid xid)
throws XAException
startTransaction in interface BrokerXAExceptionBroker.startTransaction(org.activemq.broker.BrokerClient, org.activemq.message.ActiveMQXid)
public int prepareTransaction(BrokerClient client,
ActiveMQXid xid)
throws XAException
prepareTransaction in interface BrokerXAExceptionBroker.prepareTransaction(org.activemq.broker.BrokerClient, org.activemq.message.ActiveMQXid)
public void rollbackTransaction(BrokerClient client,
ActiveMQXid xid)
throws XAException
rollbackTransaction in interface BrokerXAExceptionBroker.rollbackTransaction(org.activemq.broker.BrokerClient, org.activemq.message.ActiveMQXid)
public void commitTransaction(BrokerClient client,
ActiveMQXid xid,
boolean onePhase)
throws XAException
commitTransaction in interface BrokerXAExceptionBroker.commitTransaction(org.activemq.broker.BrokerClient, org.activemq.message.ActiveMQXid, boolean)
public ActiveMQXid[] getPreparedTransactions(BrokerClient client)
throws XAException
getPreparedTransactions in interface BrokerXAExceptionBroker.getPreparedTransactions(org.activemq.broker.BrokerClient)public File getTempDir()
getTempDir in interface Brokerpublic String getBrokerName()
getBrokerName in interface Brokerpublic String getBrokerClusterName()
getBrokerClusterName in interface Brokerpublic void setTempDir(File tempDir)
public MessageContainerManager[] getContainerManagers()
public Map getContainerManagerMap()
getContainerManagerMap in interface Brokerpublic void setContainerManagerMap(Map containerManagerMap)
public PersistenceAdapter getPersistenceAdapter()
getPersistenceAdapter in interface Brokerpublic void setPersistenceAdapter(PersistenceAdapter persistenceAdapter)
Broker
setPersistenceAdapter in interface Brokerpublic TransactionManager getTransactionManager()
public void setTransactionManager(TransactionManager transactionManager)
public SecurityAdapter getSecurityAdapter()
Broker
getSecurityAdapter in interface Brokerpublic void setSecurityAdapter(SecurityAdapter securityAdapter)
Broker
setSecurityAdapter in interface Brokerpublic RedeliveryPolicy getRedeliveryPolicy()
getRedeliveryPolicy in interface Brokerpublic void setRedeliveryPolicy(RedeliveryPolicy redeliveryPolicy)
Broker
setRedeliveryPolicy in interface Brokerpublic TransactionStore getPreparedTransactionStore()
public void setPreparedTransactionStore(TransactionStore preparedTransactionStore)
public DeadLetterPolicy getDeadLetterPolicy()
getDeadLetterPolicy in interface Brokerpublic void setDeadLetterPolicy(DeadLetterPolicy deadLetterPolicy)
setDeadLetterPolicy in interface BrokerdeadLetterPolicy - public long getMaximumMemoryUsage()
public void setMaximumMemoryUsage(long maximumMemoryUsage)
maximumMemoryUsage - The maximumMemoryUsage to set.public Context getDestinationContext(Hashtable environment)
Broker
getDestinationContext in interface Broker
protected void doMessageSend(BrokerClient client,
ActiveMQMessage message)
throws JMSException
JMSException
protected PersistenceAdapter createPersistenceAdapter()
throws JMSException
JMSException
protected PersistenceAdapter tryCreatePersistenceAdapter(String className,
File directory,
boolean ignoreErrors)
throws JMSException
JMSException
protected JMSException createInstantiateAdapterException(String className,
Throwable e)
protected Class loadClass(String name,
boolean ignoreErrors)
throws JMSException
JMSExceptionprotected String getStoreDirectory()
protected MessageContainerManager[] createContainerManagers()
protected void makeDefaultContainerManagers()
protected void validateConsumer(ConsumerInfo info)
throws JMSException
info -
JMSException
protected void checkValid()
throws JMSException
JMSExceptionpublic void addConsumerInfoListener(ConsumerInfoListener l)
addConsumerInfoListener in interface Brokerl - public void removeConsumerInfoListener(ConsumerInfoListener l)
removeConsumerInfoListener in interface Brokerl -
protected void fireConsumerInfo(BrokerClient client,
ConsumerInfo info)
public MessageContainerManager getPersistentTopicContainerManager()
getPersistentTopicContainerManager in interface Brokerpublic MessageContainerManager getTransientTopicContainerManager()
getTransientTopicContainerManager in interface Brokerpublic MessageContainerManager getPersistentQueueContainerManager()
getPersistentQueueContainerManager in interface Brokerpublic MessageContainerManager getTransientQueueContainerManager()
getTransientQueueContainerManager in interface Brokerpublic BrokerAdmin getBrokerAdmin()
Broker
getBrokerAdmin in interface BrokerBroker.getBrokerAdmin()
public void createMessageContainer(ActiveMQDestination dest)
throws JMSException
createMessageContainer in interface BrokerAdminJMSException
public void destoryMessageContainer(ActiveMQDestination dest)
throws JMSException
destoryMessageContainer in interface BrokerAdminJMSException
public MessageContainerAdmin getMessageContainerAdmin(ActiveMQDestination dest)
throws JMSException
getMessageContainerAdmin in interface BrokerAdminJMSException
public MessageContainerAdmin[] listMessageContainerAdmin()
throws JMSException
listMessageContainerAdmin in interface BrokerAdminJMSExceptionorg.activemq.broker.BrokerAdmin#listDestinations()
public void sendToDeadLetterQueue(String deadLetterName,
ActiveMQMessage expiredMessage)
throws JMSException
sendToDeadLetterQueue in interface BrokerdeadLetterName - message -
JMSExceptionpublic MemoryBoundedObjectManager getMemoryManager()
public MemoryBoundedQueueManager getQueueManager()
public String getName()
DelegateCapacityMonitor
getName in interface CapacityMonitorgetName in class DelegateCapacityMonitorpublic String toString()
toString in class Objectpublic BrokerInfo getBrokerInfo()
getBrokerInfo in interface BrokerBroker.getBrokerInfo()protected void setBrokercontainer(BrokerContainerImpl container)
protected BrokerContainerImpl getBrokerContainer()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||