org.activemq.broker
Interface BrokerContainer

All Superinterfaces:
Service
All Known Implementing Classes:
BrokerContainerImpl

public interface BrokerContainer
extends Service

The ActiveMQ JMS Broker Container which contains a Broker and one or more instances talking over some TransportChannel

Note that once a broker container has been stopped it should be discarded and a new service instance created again. Calling start() on a stopped broker will not usually work.

Version:
$Revision: 1.1.1.1 $

Method Summary
 void acknowledgeMessage(BrokerClient client, MessageAck ack)
          Acknowledge reciept of a message
 void addConnector(BrokerConnector connector)
          Called when a new connector is added to this container
 void addConnector(String bindAddress)
          Adds a new transport connector for the given bind address
 void addConnector(String bindAddress, WireFormat wireFormat)
          Adds a new transport connector for the given bind address and wire format
 void addConnector(TransportServerChannel transportConnector)
          Adds a new transport connector for the given transportConnector
 NetworkConnector addNetworkConnector()
          Adds a new network connector
 void addNetworkConnector(NetworkConnector connector)
          Adds a new network connector
 NetworkConnector addNetworkConnector(String uri)
          Adds a new network connector for the given URI
 void commitTransaction(BrokerClient client, ActiveMQXid xid, boolean onePhase)
          Commit an XA transaction.
 void commitTransaction(BrokerClient client, String transactionId)
          Commit a transaction
 void deregisterConnection(BrokerClient client, ConnectionInfo info)
          un-registers a Connection
 void deregisterMessageConsumer(BrokerClient client, ConsumerInfo info)
          De-register a MessageConsumer from the Broker
 void deregisterMessageProducer(BrokerClient client, ProducerInfo info)
          De-register a MessageProducer from the Broker
 void deregisterRemoteClientID(String remoteClientID)
          deregister a remote clientID
 void deregisterSession(BrokerClient client, SessionInfo info)
          De-register a client-side Session from the Broker (used for monitoring)
 void durableUnsubscribe(BrokerClient client, DurableUnsubscribe ds)
          Command to delete a durable topic subscription
 Broker getBroker()
           
 DiscoveryAgent getDiscoveryAgent()
          Returns the discovery agent if one is available or null if discovery is not enabled
 List getNetworkConnectors()
          Returns a list of NetworkConnector instances used to communicate with the network of Broker instances
 PersistenceAdapter getPersistenceAdapter()
          Returns the persistence adapter
 ActiveMQXid[] getPreparedTransactions(BrokerClient client)
          Gets the prepared XA transactions.
 SecurityAdapter getSecurityAdapter()
          Returns the security adapter used to authenticate and authorize access to JMS resources
 List getTransportConnectors()
          Returns the transport connectors used to communicate with clients
 int prepareTransaction(BrokerClient client, ActiveMQXid xid)
          Prepare an XA transaction.
 void registerConnection(BrokerClient client, ConnectionInfo info)
          registers a new Connection
 void registerMessageConsumer(BrokerClient client, ConsumerInfo info)
          Registers a MessageConsumer
 void registerMessageProducer(BrokerClient client, ProducerInfo info)
          Registers a MessageProducer
 void registerRemoteClientID(String remoteClientID)
          register a remote clientID
 void registerSession(BrokerClient client, SessionInfo info)
          Register a client-side Session (used for Monitoring)
 void removeConnector(BrokerConnector connector)
          Called when a connector is removed to this container
 void removeNetworkConnector(NetworkConnector connector)
          Removes the given network connector
 void rollbackTransaction(BrokerClient client, ActiveMQXid xid)
          Rollback an XA transaction.
 void rollbackTransaction(BrokerClient client, String transactionId)
          Rollback a transacton
 void sendMessage(BrokerClient client, ActiveMQMessage message)
          Send a non-transacted message to the Broker
 void setDiscoveryAgent(DiscoveryAgent discoveryAgent)
           
 void setNetworkConnectors(List networkConnectors)
           
 void setPersistenceAdapter(PersistenceAdapter persistenceAdapter)
           
 void setSecurityAdapter(SecurityAdapter securityAdapter)
          Sets the security adapter used to authenticate and authorize access to JMS resources
 void setTransportConnectors(List transportConnectors)
           
 void startTransaction(BrokerClient client, ActiveMQXid xid)
          Start an XA transaction.
 void startTransaction(BrokerClient client, String transactionId)
          Start a transaction from the Client session
 
Methods inherited from interface org.activemq.service.Service
start, stop
 

Method Detail

registerConnection

void registerConnection(BrokerClient client,
                        ConnectionInfo info)
                        throws JMSException
registers a new Connection

Parameters:
client -
info - infomation about the client-side Connection
Throws:
InvalidClientIDException - if the ClientID of the Connection is a duplicate
JMSException

deregisterConnection

void deregisterConnection(BrokerClient client,
                          ConnectionInfo info)
                          throws JMSException
un-registers a Connection

Parameters:
client -
info - infomation about the client-side Connection
Throws:
JMSException

registerMessageConsumer

void registerMessageConsumer(BrokerClient client,
                             ConsumerInfo info)
                             throws JMSException
Registers a MessageConsumer

Parameters:
client -
info -
Throws:
JMSException
JMSSecurityException - if client authentication fails for the Destination the Consumer applies for

deregisterMessageConsumer

void deregisterMessageConsumer(BrokerClient client,
                               ConsumerInfo info)
                               throws JMSException
De-register a MessageConsumer from the Broker

Parameters:
client -
info -
Throws:
JMSException

registerMessageProducer

void registerMessageProducer(BrokerClient client,
                             ProducerInfo info)
                             throws JMSException
Registers a MessageProducer

Parameters:
client -
info -
Throws:
JMSException
JMSSecurityException - if client authentication fails for the Destination the Consumer applies for

deregisterMessageProducer

void deregisterMessageProducer(BrokerClient client,
                               ProducerInfo info)
                               throws JMSException
De-register a MessageProducer from the Broker

Parameters:
client -
info -
Throws:
JMSException

registerSession

void registerSession(BrokerClient client,
                     SessionInfo info)
                     throws JMSException
Register a client-side Session (used for Monitoring)

Parameters:
client -
info -
Throws:
JMSException

deregisterSession

void deregisterSession(BrokerClient client,
                       SessionInfo info)
                       throws JMSException
De-register a client-side Session from the Broker (used for monitoring)

Parameters:
client -
info -
Throws:
JMSException

startTransaction

void startTransaction(BrokerClient client,
                      String transactionId)
                      throws JMSException
Start a transaction from the Client session

Parameters:
client -
transactionId -
Throws:
JMSException

rollbackTransaction

void rollbackTransaction(BrokerClient client,
                         String transactionId)
                         throws JMSException
Rollback a transacton

Parameters:
client -
transactionId -
Throws:
JMSException

commitTransaction

void commitTransaction(BrokerClient client,
                       String transactionId)
                       throws JMSException
Commit a transaction

Parameters:
client -
transactionId -
Throws:
JMSException

sendMessage

void sendMessage(BrokerClient client,
                 ActiveMQMessage message)
                 throws JMSException
Send a non-transacted message to the Broker

Parameters:
client -
message -
Throws:
JMSException

acknowledgeMessage

void acknowledgeMessage(BrokerClient client,
                        MessageAck ack)
                        throws JMSException
Acknowledge reciept of a message

Parameters:
client -
ack -
Throws:
JMSException

durableUnsubscribe

void durableUnsubscribe(BrokerClient client,
                        DurableUnsubscribe ds)
                        throws JMSException
Command to delete a durable topic subscription

Parameters:
client -
ds -
Throws:
JMSException

startTransaction

void startTransaction(BrokerClient client,
                      ActiveMQXid xid)
                      throws XAException
Start an XA transaction.

Parameters:
client -
xid -
Throws:
XAException

getPreparedTransactions

ActiveMQXid[] getPreparedTransactions(BrokerClient client)
                                      throws XAException
Gets the prepared XA transactions.

Parameters:
client -
Returns:
Throws:
XAException

prepareTransaction

int prepareTransaction(BrokerClient client,
                       ActiveMQXid xid)
                       throws XAException
Prepare an XA transaction.

Parameters:
client -
xid -
Throws:
XAException

rollbackTransaction

void rollbackTransaction(BrokerClient client,
                         ActiveMQXid xid)
                         throws XAException
Rollback an XA transaction.

Parameters:
client -
xid -
Throws:
XAException

commitTransaction

void commitTransaction(BrokerClient client,
                       ActiveMQXid xid,
                       boolean onePhase)
                       throws XAException
Commit an XA transaction.

Parameters:
client -
xid -
onePhase -
Throws:
XAException

addConnector

void addConnector(BrokerConnector connector)
Called when a new connector is added to this container

Parameters:
connector -

removeConnector

void removeConnector(BrokerConnector connector)
Called when a connector is removed to this container

Parameters:
connector -

getBroker

Broker getBroker()
Returns:
the Broker for the Container

getTransportConnectors

List getTransportConnectors()
Returns the transport connectors used to communicate with clients


setTransportConnectors

void setTransportConnectors(List transportConnectors)

getNetworkConnectors

List getNetworkConnectors()
Returns a list of NetworkConnector instances used to communicate with the network of Broker instances


setNetworkConnectors

void setNetworkConnectors(List networkConnectors)

getPersistenceAdapter

PersistenceAdapter getPersistenceAdapter()
Returns the persistence adapter


setPersistenceAdapter

void setPersistenceAdapter(PersistenceAdapter persistenceAdapter)

getDiscoveryAgent

DiscoveryAgent getDiscoveryAgent()
Returns the discovery agent if one is available or null if discovery is not enabled


setDiscoveryAgent

void setDiscoveryAgent(DiscoveryAgent discoveryAgent)

getSecurityAdapter

SecurityAdapter getSecurityAdapter()
Returns the security adapter used to authenticate and authorize access to JMS resources


setSecurityAdapter

void setSecurityAdapter(SecurityAdapter securityAdapter)
Sets the security adapter used to authenticate and authorize access to JMS resources


addNetworkConnector

NetworkConnector addNetworkConnector(String uri)
                                     throws JMSException
Adds a new network connector for the given URI

Throws:
JMSException

addNetworkConnector

NetworkConnector addNetworkConnector()
Adds a new network connector

Returns:
the newly created network connector

addNetworkConnector

void addNetworkConnector(NetworkConnector connector)
Adds a new network connector


removeNetworkConnector

void removeNetworkConnector(NetworkConnector connector)
Removes the given network connector


addConnector

void addConnector(String bindAddress)
                  throws JMSException
Adds a new transport connector for the given bind address

Throws:
JMSException

addConnector

void addConnector(String bindAddress,
                  WireFormat wireFormat)
                  throws JMSException
Adds a new transport connector for the given bind address and wire format

Throws:
JMSException

addConnector

void addConnector(TransportServerChannel transportConnector)
Adds a new transport connector for the given transportConnector


registerRemoteClientID

void registerRemoteClientID(String remoteClientID)
register a remote clientID

Parameters:
remoteClientID -

deregisterRemoteClientID

void deregisterRemoteClientID(String remoteClientID)
deregister a remote clientID

Parameters:
remoteClientID -


Copyright © 2004-2010 Protique, Ltd.. All Rights Reserved.