|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.codehaus.activemq.capacity.DelegateCapacityMonitor
org.codehaus.activemq.broker.impl.DefaultBroker
The default Broker implementation
| Nested Class Summary |
| Nested classes inherited from class org.codehaus.activemq.capacity.CapacityMonitor |
CapacityMonitor.BasicCapacityMonitor |
| Field Summary | |
protected static Class[] |
NEWINSTANCE_PARAMETER_TYPES
|
protected static String |
PERSISTENCE_ADAPTER_PROPERTY
|
protected static String |
PROPERTY_STORE_DIRECTORY
|
| Fields inherited from class org.codehaus.activemq.capacity.DelegateCapacityMonitor |
|
| Constructor Summary | |
DefaultBroker(String brokerName)
|
|
DefaultBroker(String brokerName,
PersistenceAdapter persistenceAdapter)
|
|
DefaultBroker(String brokerName,
String brokerClusterName)
|
|
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 |
acknowledgeTransactedMessage(BrokerClient client,
String transactionId,
MessageAck ack)
Acknowledge consumption of a message within a transaction |
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(Class adapterClass,
Throwable e)
|
protected PersistenceAdapter |
createPersistenceAdapter()
Factory method to create a default persistence adapter |
void |
deleteSubscription(String clientId,
String subscriberName)
Delete a durable subscriber |
protected void |
doMessageSend(BrokerClient client,
ActiveMQMessage message)
|
protected void |
fireConsumerInfo(BrokerClient client,
ConsumerInfo info)
|
String |
getBrokerClusterName()
|
String |
getBrokerName()
|
Map |
getContainerManagerMap()
|
MessageContainerManager[] |
getContainerManagers()
|
Context |
getDestinationContext(Hashtable environment)
Returns the naming context of the destinations available in this broker |
long |
getMaximumMemoryUsage()
|
PersistenceAdapter |
getPersistenceAdapter()
|
MessageContainerManager |
getPersistentQueueContainerManager()
|
MessageContainerManager |
getPersistentTopicContainerManager()
|
ActiveMQXid[] |
getPreparedTransactions(BrokerClient client)
Gets the prepared XA transactions. |
PreparedTransactionStore |
getPreparedTransactionStore()
|
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()
|
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 |
redeliverMessage(BrokerClient client,
MessageAck ack)
Called after a rollback of a JMS transaction to redeliver the message to the consumers dispatch queue |
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 |
sendTransactedMessage(BrokerClient client,
String transactionId,
ActiveMQMessage message)
send a message to the broker within a transaction |
void |
setContainerManagerMap(Map containerManagerMap)
|
void |
setMaximumMemoryUsage(long maximumMemoryUsage)
|
void |
setPersistenceAdapter(PersistenceAdapter persistenceAdapter)
set the persistence adaptor |
void |
setPreparedTransactionStore(PreparedTransactionStore preparedTransactionStore)
|
void |
setRedeliveryPolicy(RedeliveryPolicy redeliveryPolicy)
|
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 |
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.codehaus.activemq.capacity.DelegateCapacityMonitor |
addCapacityEventListener, getCurrentCapacity, getCurrentValue, getName, getRoundedCapacity, getRoundingFactor, getValueLimit, removeCapacityEventListener, setCurrentValue, setDelegate, setName, setRoundingFactor, setValueLimit |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.codehaus.activemq.capacity.CapacityMonitor |
addCapacityEventListener, getCurrentCapacity, getCurrentValue, getName, getRoundedCapacity, getRoundingFactor, getValueLimit, removeCapacityEventListener, setCurrentValue, setName, setRoundingFactor, setValueLimit |
| Field Detail |
protected static final String PROPERTY_STORE_DIRECTORY
protected static final String PERSISTENCE_ADAPTER_PROPERTY
protected static final Class[] NEWINSTANCE_PARAMETER_TYPES
| Constructor Detail |
public DefaultBroker(String brokerName,
String brokerClusterName)
public DefaultBroker(String brokerName)
public DefaultBroker(String brokerName,
String brokerClusterName,
PersistenceAdapter persistenceAdapter)
public DefaultBroker(String brokerName,
PersistenceAdapter persistenceAdapter)
| Method Detail |
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 sendTransactedMessage(BrokerClient client,
String transactionId,
ActiveMQMessage message)
throws JMSException
sendTransactedMessage in interface BrokerJMSException
public void acknowledgeMessage(BrokerClient client,
MessageAck ack)
throws JMSException
acknowledgeMessage in interface BrokerJMSException
public void acknowledgeTransactedMessage(BrokerClient client,
String transactionId,
MessageAck ack)
throws JMSException
acknowledgeTransactedMessage in interface BrokerJMSException
public void redeliverMessage(BrokerClient client,
MessageAck ack)
throws JMSException
Broker
redeliverMessage in interface Brokerclient - ack -
JMSException
public void deleteSubscription(String clientId,
String subscriberName)
throws JMSException
Broker
deleteSubscription in interface BrokerclientId - subscriberName -
JMSException - if the subscriber doesn't exist or is still active
public void startTransaction(BrokerClient client,
String transactionId)
throws JMSException
startTransaction in interface Brokerclient - transactionId -
JMSExceptionBroker.startTransaction(org.codehaus.activemq.broker.BrokerClient, java.lang.String)
public void commitTransaction(BrokerClient client,
String transactionId)
throws JMSException
Broker
commitTransaction in interface Brokerclient - transactionId -
JMSException
public void rollbackTransaction(BrokerClient client,
String transactionId)
throws JMSException
rollbackTransaction in interface Brokerclient - transactionId -
JMSException
public void startTransaction(BrokerClient client,
ActiveMQXid xid)
throws XAException
startTransaction in interface Brokerclient - xid -
XAExceptionBroker.startTransaction(org.codehaus.activemq.broker.BrokerClient, org.codehaus.activemq.message.ActiveMQXid)
public int prepareTransaction(BrokerClient client,
ActiveMQXid xid)
throws XAException
prepareTransaction in interface Brokerclient - xid -
XAExceptionBroker.prepareTransaction(org.codehaus.activemq.broker.BrokerClient, org.codehaus.activemq.message.ActiveMQXid)
public void rollbackTransaction(BrokerClient client,
ActiveMQXid xid)
throws XAException
rollbackTransaction in interface Brokerclient - xid -
XAExceptionBroker.rollbackTransaction(org.codehaus.activemq.broker.BrokerClient, org.codehaus.activemq.message.ActiveMQXid)
public void commitTransaction(BrokerClient client,
ActiveMQXid xid,
boolean onePhase)
throws XAException
commitTransaction in interface Brokerclient - xid - onePhase -
XAExceptionBroker.commitTransaction(org.codehaus.activemq.broker.BrokerClient, org.codehaus.activemq.message.ActiveMQXid, boolean)
public ActiveMQXid[] getPreparedTransactions(BrokerClient client)
throws XAException
getPreparedTransactions in interface Brokerclient -
XAExceptionBroker.getPreparedTransactions(org.codehaus.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 BrokerpersistenceAdapter - public 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)
setRedeliveryPolicy in interface Brokerpublic PreparedTransactionStore getPreparedTransactionStore()
public void setPreparedTransactionStore(PreparedTransactionStore preparedTransactionStore)
public long getMaximumMemoryUsage()
public void setMaximumMemoryUsage(long maximumMemoryUsage)
maximumMemoryUsage - The maximumMemoryUsage to set.public Context getDestinationContext(Hashtable environment)
Broker
getDestinationContext in interface Brokerenvironment -
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(Class adapterClass,
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 Broker
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||