org.safehaus.penrose.connector
Class ConnectionManager

java.lang.Object
  extended byorg.safehaus.penrose.connector.ConnectionManager
All Implemented Interfaces:
ConnectionManagerMBean

public class ConnectionManager
extends java.lang.Object
implements ConnectionManagerMBean

Author:
Endi S. Dewata

Field Summary
 java.util.Map adapterConfigs
           
 java.util.Map connectionConfigs
           
 java.util.Map connections
           
 org.slf4j.Logger log
           
 java.util.Map partitions
           
 
Constructor Summary
ConnectionManager()
           
 
Method Summary
 void clear()
           
 Connection getConnection(Partition partition, java.lang.String connectionName)
           
 java.util.Collection getConnectionNames()
           
 void init(Partition partition, ConnectionConfig connectionConfig, AdapterConfig adapterConfig)
           
 java.lang.Object openConnection(Partition partition, java.lang.String connectionName)
           
 java.lang.Object openConnection(java.lang.String connectionName)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

public org.slf4j.Logger log

connectionConfigs

public java.util.Map connectionConfigs

adapterConfigs

public java.util.Map adapterConfigs

partitions

public java.util.Map partitions

connections

public java.util.Map connections
Constructor Detail

ConnectionManager

public ConnectionManager()
Method Detail

init

public void init(Partition partition,
                 ConnectionConfig connectionConfig,
                 AdapterConfig adapterConfig)
          throws java.lang.Exception
Throws:
java.lang.Exception

clear

public void clear()

start

public void start()
           throws java.lang.Exception
Specified by:
start in interface ConnectionManagerMBean
Throws:
java.lang.Exception

stop

public void stop()
          throws java.lang.Exception
Specified by:
stop in interface ConnectionManagerMBean
Throws:
java.lang.Exception

getConnection

public Connection getConnection(Partition partition,
                                java.lang.String connectionName)
                         throws java.lang.Exception
Throws:
java.lang.Exception

getConnectionNames

public java.util.Collection getConnectionNames()
Specified by:
getConnectionNames in interface ConnectionManagerMBean

openConnection

public java.lang.Object openConnection(java.lang.String connectionName)
                                throws java.lang.Exception
Throws:
java.lang.Exception

openConnection

public java.lang.Object openConnection(Partition partition,
                                       java.lang.String connectionName)
                                throws java.lang.Exception
Throws:
java.lang.Exception