org.jboss.blacktie.jatmibroker.jab.factory
Class JABConnectionFactory

java.lang.Object
  extended by org.jboss.blacktie.jatmibroker.jab.factory.JABConnectionFactory

public class JABConnectionFactory
extends Object

The connection factory is the entry point into the JAB API for client applications. It is a singleton class which is accessed via the JABConnectionFactory.getInstance() method. Connections obtained via the getConnection(String) method, should be closed via the closeConnection(String) method.


Method Summary
 void closeConnection(String connectionName)
          Close the JAB connection to the server
 JABConnection getConnection(String connectionName)
          Obtain a reference to the connection identified by the parameter
static JABConnectionFactory getInstance()
          Obtain a reference to the single instance of JABConnectionFactory per classloader.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static JABConnectionFactory getInstance()
                                        throws JABException
Obtain a reference to the single instance of JABConnectionFactory per classloader.

Returns:
The instance
Throws:
JABException - In case the connection factory cannot be loaded

getConnection

public JABConnection getConnection(String connectionName)
                            throws JABException
Obtain a reference to the connection identified by the parameter

Parameters:
connectionName - The name of the connection to retrieve
Returns:
The single connection named connectionName
Throws:
JABException - If the connection cannot be created

closeConnection

public void closeConnection(String connectionName)
                     throws JABException
Close the JAB connection to the server

Parameters:
connectionName - The name of the connection to close
Throws:
JABException - In case the connection cannot be closed


Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.