org.activemq.broker
Interface BrokerConnector

All Superinterfaces:
Service
All Known Implementing Classes:
BrokerConnectorImpl

public interface BrokerConnector
extends Service

The Broker is the client side interface to the JMS server

Version:
$Revision: 1.1.1.1 $

Method Summary
 void acknowledgeMessage(BrokerClient client, MessageAck ack)
          Acknowledge reciept of a message
 void commitTransaction(BrokerClient client, ActiveMQXid xid, boolean onePhase)
          Commit an XA transaction.
 void commitTransaction(BrokerClient client, String transactionId)
          Commit a transaction
 void deregisterClient(BrokerClient client, ConnectionInfo info)
          Deregister a Broker Client
 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 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
 int getBrokerCapacity()
          Get a hint about the broker capacity for more messages
 BrokerContainer getBrokerContainer()
           
 BrokerInfo getBrokerInfo()
           
 ActiveMQXid[] getPreparedTransactions(BrokerClient client)
          Get all the Xids of the prepared XA transactions.
 String getResourceManagerId(BrokerClient client)
          Gets the unique id of the resource manager used for managing xa transactions.
 TransportServerChannel getServerChannel()
           
 int prepareTransaction(BrokerClient client, ActiveMQXid xid)
          Prepare an XA transaction.
 void registerClient(BrokerClient client, ConnectionInfo info)
          Register a Broker Client
 void registerMessageConsumer(BrokerClient client, ConsumerInfo info)
          Registers a MessageConsumer
 void registerMessageProducer(BrokerClient client, ProducerInfo info)
          Registers a MessageProducer
 void registerSession(BrokerClient client, SessionInfo info)
          Register a client-side Session (used for Monitoring)
 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 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

getBrokerInfo

public BrokerInfo getBrokerInfo()
Returns:
infomation about the Broker

getServerChannel

public TransportServerChannel getServerChannel()
Returns:
the transport channel this broker is using

getBrokerCapacity

public int getBrokerCapacity()
Get a hint about the broker capacity for more messages

Returns:
percentage value (0-100) about how much capacity the broker has

registerClient

public void registerClient(BrokerClient client,
                           ConnectionInfo info)
                    throws JMSException
Register a Broker Client

Parameters:
client -
info - contains infomation about the Connection this Client represents
Throws:
JMSException
InvalidClientIDException - if the JMS client specifies an invalid or duplicate client ID.
JMSSecurityException - if client authentication fails due to an invalid user name or password.

deregisterClient

public void deregisterClient(BrokerClient client,
                             ConnectionInfo info)
                      throws JMSException
Deregister a Broker Client

Parameters:
client -
info -
Throws:
JMSException - if some internal error occurs

registerMessageConsumer

public 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

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

Parameters:
client -
info -
Throws:
JMSException

registerMessageProducer

public 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

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

Parameters:
client -
info -
Throws:
JMSException

registerSession

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

Parameters:
client -
info -
Throws:
JMSException

deregisterSession

public 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

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

Parameters:
client -
transactionId -
Throws:
JMSException

rollbackTransaction

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

Parameters:
client -
transactionId -
Throws:
JMSException

commitTransaction

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

Parameters:
client -
transactionId -
Throws:
JMSException

startTransaction

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

Parameters:
client -
xid -
Throws:
XAException

getPreparedTransactions

public ActiveMQXid[] getPreparedTransactions(BrokerClient client)
                                      throws XAException
Get all the Xids of the prepared XA transactions.

Parameters:
client -
Returns:
Throws:
XAException

prepareTransaction

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

Parameters:
client -
xid -
Returns:
Throws:
XAException

rollbackTransaction

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

Parameters:
client -
xid -
Throws:
XAException

commitTransaction

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

Parameters:
client -
xid -
onePhase -
Throws:
XAException

sendMessage

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

Parameters:
client -
message -
Throws:
JMSException

acknowledgeMessage

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

Parameters:
client -
ack -
Throws:
JMSException

durableUnsubscribe

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

Parameters:
client -
ds -
Throws:
JMSException

getResourceManagerId

public String getResourceManagerId(BrokerClient client)
Gets the unique id of the resource manager used for managing xa transactions.

Parameters:
client -
Returns:
the id

getBrokerContainer

public BrokerContainer getBrokerContainer()
Returns:
the BrokerContainer for this Connector


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