|
|||||||||||
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 java.lang.Class[] |
NEWINSTANCE_PARAMETER_TYPES
|
protected static java.lang.String |
PERSISTENCE_ADAPTER_PROPERTY
|
protected static java.lang.String |
PROPERTY_STORE_DIRECTORY
|
Fields inherited from class org.codehaus.activemq.capacity.DelegateCapacityMonitor |
|
Constructor Summary | |
DefaultBroker(java.lang.String brokerName)
|
|
DefaultBroker(java.lang.String brokerName,
PersistenceAdapter persistenceAdapter)
|
Method Summary | |
void |
acknowledgeMessage(BrokerClient client,
MessageAck ack)
Acknowledge consumption of a message by the Message Consumer |
void |
acknowledgeTransactedMessage(BrokerClient client,
java.lang.String transactionId,
MessageAck ack)
Acknowledge consumption of a message within a transaction |
void |
addMessageConsumer(BrokerClient client,
ConsumerInfo info)
Add an active message consumer |
protected void |
checkValid()
|
void |
cleanUpClient(BrokerClient client)
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 |
commitTransaction(BrokerClient client,
ActiveMQXid xid,
boolean onePhase)
Commit an XA Transaction. |
void |
commitTransaction(BrokerClient client,
java.lang.String transactionId)
commit a transaction |
protected MessageContainerManager[] |
createContainerManagers()
Factory method to create the default container managers |
protected JMSException |
createInstantiateAdapterException(java.lang.Class adapterClass,
java.lang.Throwable e)
|
protected PersistenceAdapter |
createPersistenceAdapter()
Factory method to create a default persistence adapter |
void |
deleteSubscription(java.lang.String clientId,
java.lang.String subscriberName)
Delete a durable subscriber |
java.lang.String |
getBrokerName()
|
MessageContainerManager[] |
getContainerManagers()
|
long |
getMaximumMemoryUsage()
|
PersistenceAdapter |
getPersistenceAdapter()
|
ActiveMQXid[] |
getPreparedTransactions(BrokerClient client)
Gets the prepared XA transactions. |
PreparedTransactionStore |
getPreparedTransactionStore()
|
protected java.lang.String |
getStoreDirectory()
|
java.io.File |
getTempDir()
Get a temp directory - used for spooling |
TransactionManager |
getTransactionManager()
|
protected java.lang.Class |
loadClass(java.lang.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 |
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 |
removeMessageConsumer(BrokerClient client,
ConsumerInfo info)
remove an active message consumer |
void |
rollbackTransaction(BrokerClient client,
ActiveMQXid xid)
Rollback an XA Transaction. |
void |
rollbackTransaction(BrokerClient client,
java.lang.String transactionId)
rollback a transaction |
void |
sendMessage(BrokerClient client,
ActiveMQMessage message)
send a message to the broker |
void |
sendTransactedMessage(BrokerClient client,
java.lang.String transactionId,
ActiveMQMessage message)
send a message to the broker within a transaction |
void |
setContainerManagers(MessageContainerManager[] containerManagers)
|
void |
setMaximumMemoryUsage(long maximumMemoryUsage)
|
void |
setPersistenceAdapter(PersistenceAdapter persistenceAdapter)
|
void |
setPreparedTransactionStore(PreparedTransactionStore preparedTransactionStore)
|
void |
setTempDir(java.io.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,
java.lang.String transactionId)
Start a transaction. |
void |
stop()
stop this Service |
protected PersistenceAdapter |
tryCreatePersistenceAdapter(java.lang.String className,
java.io.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 java.lang.String PROPERTY_STORE_DIRECTORY
protected static final java.lang.String PERSISTENCE_ADAPTER_PROPERTY
protected static final java.lang.Class[] NEWINSTANCE_PARAMETER_TYPES
Constructor Detail |
public DefaultBroker(java.lang.String brokerName)
public DefaultBroker(java.lang.String brokerName, PersistenceAdapter persistenceAdapter)
Method Detail |
public void start() throws JMSException
start
in interface Service
JMSException
public void stop() throws JMSException
stop
in interface Service
JMSException
public void acknowledgeMessage(BrokerClient client, MessageAck ack) throws JMSException
acknowledgeMessage
in interface Broker
client
- ack
-
JMSException
public void acknowledgeTransactedMessage(BrokerClient client, java.lang.String transactionId, MessageAck ack) throws JMSException
acknowledgeTransactedMessage
in interface Broker
client
- transactionId
- ack
-
JMSException
public void sendMessage(BrokerClient client, ActiveMQMessage message) throws JMSException
sendMessage
in interface Broker
client
- message
-
JMSException
public void sendTransactedMessage(BrokerClient client, java.lang.String transactionId, ActiveMQMessage message) throws JMSException
sendTransactedMessage
in interface Broker
client
- transactionId
- message
-
JMSException
public void addMessageConsumer(BrokerClient client, ConsumerInfo info) throws JMSException
addMessageConsumer
in interface Broker
client
- info
-
JMSException
public void removeMessageConsumer(BrokerClient client, ConsumerInfo info) throws JMSException
removeMessageConsumer
in interface Broker
client
- info
-
JMSException
public void redeliverMessage(BrokerClient client, MessageAck ack) throws JMSException
Broker
redeliverMessage
in interface Broker
client
- ack
-
JMSException
public void deleteSubscription(java.lang.String clientId, java.lang.String subscriberName) throws JMSException
deleteSubscription
in interface Broker
clientId
- subscriberName
-
JMSException
- if the subscriber doesn't exist or is still activepublic void startTransaction(BrokerClient client, java.lang.String transactionId) throws JMSException
startTransaction
in interface Broker
client
- transactionId
-
JMSException
Broker.startTransaction(org.codehaus.activemq.broker.BrokerClient, java.lang.String)
public void commitTransaction(BrokerClient client, java.lang.String transactionId) throws JMSException
commitTransaction
in interface Broker
client
- transactionId
-
JMSException
public void rollbackTransaction(BrokerClient client, java.lang.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.codehaus.activemq.broker.BrokerClient, org.codehaus.activemq.message.ActiveMQXid)
public int prepareTransaction(BrokerClient client, ActiveMQXid xid) throws XAException
prepareTransaction
in interface Broker
client
- xid
-
XAException
Broker.prepareTransaction(org.codehaus.activemq.broker.BrokerClient, org.codehaus.activemq.message.ActiveMQXid)
public void rollbackTransaction(BrokerClient client, ActiveMQXid xid) throws XAException
rollbackTransaction
in interface Broker
client
- xid
-
XAException
Broker.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 Broker
client
- xid
- onePhase
-
XAException
Broker.commitTransaction(org.codehaus.activemq.broker.BrokerClient, org.codehaus.activemq.message.ActiveMQXid, boolean)
public void cleanUpClient(BrokerClient client) throws JMSException
cleanUpClient
in interface Broker
client
-
JMSException
public ActiveMQXid[] getPreparedTransactions(BrokerClient client) throws XAException
getPreparedTransactions
in interface Broker
client
-
XAException
Broker.getPreparedTransactions(org.codehaus.activemq.broker.BrokerClient)
public java.io.File getTempDir()
getTempDir
in interface Broker
public java.lang.String getBrokerName()
getBrokerName
in interface Broker
public void setTempDir(java.io.File tempDir)
public MessageContainerManager[] getContainerManagers()
public void setContainerManagers(MessageContainerManager[] containerManagers)
public PersistenceAdapter getPersistenceAdapter()
getPersistenceAdapter
in interface Broker
public void setPersistenceAdapter(PersistenceAdapter persistenceAdapter)
setPersistenceAdapter
in interface Broker
public TransactionManager getTransactionManager()
public void setTransactionManager(TransactionManager transactionManager)
public PreparedTransactionStore getPreparedTransactionStore()
public void setPreparedTransactionStore(PreparedTransactionStore preparedTransactionStore)
public long getMaximumMemoryUsage()
public void setMaximumMemoryUsage(long maximumMemoryUsage)
maximumMemoryUsage
- The maximumMemoryUsage to set.protected PersistenceAdapter createPersistenceAdapter() throws JMSException
JMSException
protected PersistenceAdapter tryCreatePersistenceAdapter(java.lang.String className, java.io.File directory, boolean ignoreErrors) throws JMSException
JMSException
protected JMSException createInstantiateAdapterException(java.lang.Class adapterClass, java.lang.Throwable e)
protected java.lang.Class loadClass(java.lang.String name, boolean ignoreErrors) throws JMSException
JMSException
protected java.lang.String getStoreDirectory()
protected MessageContainerManager[] createContainerManagers()
protected void validateConsumer(ConsumerInfo info) throws JMSException
info
-
JMSException
protected void checkValid() throws JMSException
JMSException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |