|
|||||||||||
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
The default Broker
implementation
Nested Class Summary |
Nested classes inherited from class 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 Service
JMSException
public void stop() throws JMSException
stop
in interface Service
JMSException
public void addClient(BrokerClient client, ConnectionInfo info) throws JMSException
Broker
addClient
in interface Broker
JMSException
public void removeClient(BrokerClient client, ConnectionInfo info) throws JMSException
Broker
removeClient
in interface Broker
JMSException
public void addMessageProducer(BrokerClient client, ProducerInfo info) throws JMSException
Broker
addMessageProducer
in interface Broker
JMSException
public void removeMessageProducer(BrokerClient client, ProducerInfo info) throws JMSException
Broker
removeMessageProducer
in interface Broker
JMSException
public void addMessageConsumer(BrokerClient client, ConsumerInfo info) throws JMSException
addMessageConsumer
in interface Broker
JMSException
public void removeMessageConsumer(BrokerClient client, ConsumerInfo info) throws JMSException
removeMessageConsumer
in interface Broker
JMSException
public void sendMessage(BrokerClient client, ActiveMQMessage message) throws JMSException
sendMessage
in interface Broker
JMSException
public void acknowledgeMessage(BrokerClient client, MessageAck ack) throws JMSException
acknowledgeMessage
in interface Broker
JMSException
public void deleteSubscription(String clientId, String subscriberName) throws JMSException
Broker
deleteSubscription
in interface Broker
clientId
- subscriberName
-
JMSException
- if the subscriber doesn't exist or is still activepublic void startTransaction(BrokerClient client, String transactionId) throws JMSException
startTransaction
in interface Broker
client
- transactionId
-
JMSException
Broker.startTransaction(org.activemq.broker.BrokerClient, java.lang.String)
public void commitTransaction(BrokerClient client, String transactionId) throws JMSException
Broker
commitTransaction
in interface Broker
client
- transactionId
-
JMSException
public void rollbackTransaction(BrokerClient client, String transactionId) throws JMSException
rollbackTransaction
in interface Broker
client
- transactionId
-
JMSException
public void startTransaction(BrokerClient client, ActiveMQXid xid) throws XAException
startTransaction
in interface Broker
client
- xid
-
XAException
Broker.startTransaction(org.activemq.broker.BrokerClient, org.activemq.message.ActiveMQXid)
public int prepareTransaction(BrokerClient client, ActiveMQXid xid) throws XAException
prepareTransaction
in interface Broker
client
- xid
-
XAException
Broker.prepareTransaction(org.activemq.broker.BrokerClient, org.activemq.message.ActiveMQXid)
public void rollbackTransaction(BrokerClient client, ActiveMQXid xid) throws XAException
rollbackTransaction
in interface Broker
client
- xid
-
XAException
Broker.rollbackTransaction(org.activemq.broker.BrokerClient, org.activemq.message.ActiveMQXid)
public void commitTransaction(BrokerClient client, ActiveMQXid xid, boolean onePhase) throws XAException
commitTransaction
in interface Broker
client
- xid
- onePhase
-
XAException
Broker.commitTransaction(org.activemq.broker.BrokerClient, org.activemq.message.ActiveMQXid, boolean)
public ActiveMQXid[] getPreparedTransactions(BrokerClient client) throws XAException
getPreparedTransactions
in interface Broker
client
-
XAException
Broker.getPreparedTransactions(org.activemq.broker.BrokerClient)
public File getTempDir()
getTempDir
in interface Broker
public String getBrokerName()
getBrokerName
in interface Broker
public String getBrokerClusterName()
getBrokerClusterName
in interface Broker
public void setTempDir(File tempDir)
public MessageContainerManager[] getContainerManagers()
public Map getContainerManagerMap()
getContainerManagerMap
in interface Broker
public void setContainerManagerMap(Map containerManagerMap)
public PersistenceAdapter getPersistenceAdapter()
getPersistenceAdapter
in interface Broker
public void setPersistenceAdapter(PersistenceAdapter persistenceAdapter)
Broker
setPersistenceAdapter
in interface Broker
persistenceAdapter
- public TransactionManager getTransactionManager()
public void setTransactionManager(TransactionManager transactionManager)
public SecurityAdapter getSecurityAdapter()
Broker
getSecurityAdapter
in interface Broker
public void setSecurityAdapter(SecurityAdapter securityAdapter)
Broker
setSecurityAdapter
in interface Broker
public RedeliveryPolicy getRedeliveryPolicy()
getRedeliveryPolicy
in interface Broker
public void setRedeliveryPolicy(RedeliveryPolicy redeliveryPolicy)
Broker
setRedeliveryPolicy
in interface Broker
redeliveryPolicy
- public TransactionStore getPreparedTransactionStore()
public void setPreparedTransactionStore(TransactionStore preparedTransactionStore)
public DeadLetterPolicy getDeadLetterPolicy()
getDeadLetterPolicy
in interface Broker
public void setDeadLetterPolicy(DeadLetterPolicy deadLetterPolicy)
setDeadLetterPolicy
in interface Broker
deadLetterPolicy
- public long getMaximumMemoryUsage()
public void setMaximumMemoryUsage(long maximumMemoryUsage)
maximumMemoryUsage
- The maximumMemoryUsage to set.public Context getDestinationContext(Hashtable environment)
Broker
getDestinationContext
in interface Broker
environment
-
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
JMSException
protected String getStoreDirectory()
protected MessageContainerManager[] createContainerManagers()
protected void makeDefaultContainerManagers()
protected void validateConsumer(ConsumerInfo info) throws JMSException
info
-
JMSException
protected void checkValid() throws JMSException
JMSException
public void addConsumerInfoListener(ConsumerInfoListener l)
addConsumerInfoListener
in interface Broker
l
- public void removeConsumerInfoListener(ConsumerInfoListener l)
removeConsumerInfoListener
in interface Broker
l
- protected void fireConsumerInfo(BrokerClient client, ConsumerInfo info)
public MessageContainerManager getPersistentTopicContainerManager()
getPersistentTopicContainerManager
in interface Broker
public MessageContainerManager getTransientTopicContainerManager()
getTransientTopicContainerManager
in interface Broker
public MessageContainerManager getPersistentQueueContainerManager()
getPersistentQueueContainerManager
in interface Broker
public MessageContainerManager getTransientQueueContainerManager()
getTransientQueueContainerManager
in interface Broker
public BrokerAdmin getBrokerAdmin()
Broker
getBrokerAdmin
in interface Broker
Broker.getBrokerAdmin()
public void createMessageContainer(ActiveMQDestination dest) throws JMSException
createMessageContainer
in interface BrokerAdmin
JMSException
public void destoryMessageContainer(ActiveMQDestination dest) throws JMSException
destoryMessageContainer
in interface BrokerAdmin
JMSException
public MessageContainerAdmin getMessageContainerAdmin(ActiveMQDestination dest) throws JMSException
getMessageContainerAdmin
in interface BrokerAdmin
JMSException
public MessageContainerAdmin[] listMessageContainerAdmin() throws JMSException
listMessageContainerAdmin
in interface BrokerAdmin
JMSException
org.activemq.broker.BrokerAdmin#listDestinations()
public void sendToDeadLetterQueue(String deadLetterName, ActiveMQMessage expiredMessage) throws JMSException
sendToDeadLetterQueue
in interface Broker
deadLetterName
- expiredMessage
-
JMSException
public MemoryBoundedObjectManager getMemoryManager()
public MemoryBoundedQueueManager getQueueManager()
public String getName()
CapacityMonitor
getName
in interface CapacityMonitor
getName
in class DelegateCapacityMonitor
public String toString()
public BrokerInfo getBrokerInfo()
getBrokerInfo
in interface Broker
Broker.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 |