org.apache.qpid.management.configuration
Class QpidDatasource

java.lang.Object
  extended by org.apache.qpid.management.configuration.QpidDatasource

public final class QpidDatasource
extends Object

Qpid datasource. Basically it is a connection pool manager used for optimizing broker connections usage.


Nested Class Summary
(package private)  class QpidDatasource.PooledConnection
          A connection decorator used for adding pool interaction behaviour to an existing connection.
(package private)  class QpidDatasource.QpidConnectionFactory
          This is the connection factory, that is, the factory used to manage the lifecycle (create, validate & destroy) of the broker connection(s).
 
Method Summary
(package private)  void addConnectionPool(UUID brokerId, BrokerConnectionData connectionData)
          Adds a connection pool to this datasource.
 org.apache.qpid.transport.Connection getConnection(UUID brokerId)
          Gets an available connection from the pool of the given broker.
static QpidDatasource getInstance()
          Entry point method for retrieving the singleton instance of this datasource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getConnection

public org.apache.qpid.transport.Connection getConnection(UUID brokerId)
                                                   throws Exception
Gets an available connection from the pool of the given broker.

Parameters:
brokerId - the broker identifier.
Returns:
a valid connection to the broker associated with the given identifier.
Throws:
Exception

getInstance

public static QpidDatasource getInstance()
Entry point method for retrieving the singleton instance of this datasource.

Returns:
the qpid datasource singleton instance.

addConnectionPool

void addConnectionPool(UUID brokerId,
                       BrokerConnectionData connectionData)
                 throws Exception
Adds a connection pool to this datasource.

Parameters:
brokerId - the broker identifier that will be associated with the new connection pool.
connectionData - the broker connection data.
Throws:
Exception - when the pool cannot be created.


Licensed to the Apache Software Foundation