net.spy.db
Class ConnectionSourceFactory

java.lang.Object
  extended by net.spy.SpyObject
      extended by net.spy.db.ConnectionSourceFactory

public class ConnectionSourceFactory
extends SpyObject

Get a connection source from a config.


Method Summary
 ConnectionSource getConnectionSource(SpyConfig conf)
          Get a connection source by name.
static ConnectionSourceFactory getInstance()
          Get the singleton ConnectionSourceFactory instance.
static void setInstance(ConnectionSourceFactory to)
          Set the singleton instance.
 
Methods inherited from class net.spy.SpyObject
getLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ConnectionSourceFactory getInstance()
Get the singleton ConnectionSourceFactory instance.


setInstance

public static void setInstance(ConnectionSourceFactory to)
Set the singleton instance.


getConnectionSource

public ConnectionSource getConnectionSource(SpyConfig conf)
Get a connection source by name.

Parameters:
conf - configuration specifying how to get the source
Returns:
the connection source
Throws:
RuntimeException - if the specified connection source cannot be instantiated


Copyright © 1995-2007 SPY Internetworking. All Rights Reserved.