|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.jdbdump.connect.DatabaseConnectorFactory
public class DatabaseConnectorFactory
A DatabaseConnectorFactory is an object that lists all the database types that can be backed up and creates connectors to the specific database types. Connectors are the objects that extend the DatabaseConnector class and provide methods that enable you to create backup of a specific database. This class implements two design patterns: Factory and Singleton. Factory pattern makes it easy to produce the proper databse connector. Singleton pattern checks if there is only one instance of DatabaseConnectorFactory.
Field Summary | |
---|---|
static DatabaseConnectorFactory |
singleton
an object providing Singleton desing pattern implementation |
Constructor Summary | |
---|---|
DatabaseConnectorFactory()
|
Method Summary | |
---|---|
DatabaseConnector |
createConnector(java.lang.String name)
Creates connector to the database on the basis of provided data and implements the Factory design pattern |
static DatabaseConnectorFactory |
getInstance()
Imlements Singleton desing pattern |
java.lang.String[] |
listPlugins()
Lists all database plugins that are available. |
java.util.ArrayList<java.lang.String> |
listPlugins(java.lang.String tosubclassname)
Lists all the classes inheriting a given class in the currently loaded packages. |
java.util.ArrayList<java.lang.String> |
listPlugins(java.lang.String pckgname,
java.lang.Class tosubclass)
Lists all the classes inheriting a given class in a given package. |
java.util.ArrayList<java.lang.String> |
listPlugins(java.lang.String pckname,
java.lang.String tosubclassname)
Listss all the classes inheriting a given class in a given package. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static DatabaseConnectorFactory singleton
Constructor Detail |
---|
public DatabaseConnectorFactory()
Method Detail |
---|
public static DatabaseConnectorFactory getInstance()
public java.lang.String[] listPlugins()
public java.util.ArrayList<java.lang.String> listPlugins(java.lang.String tosubclassname)
tosubclassname
- the name of the class to inherit from
java.lang.ClassNotFoundException
public java.util.ArrayList<java.lang.String> listPlugins(java.lang.String pckname, java.lang.String tosubclassname)
pckgname
- the fully qualified name of the packagetosubclass
- the name of the class to inherit from
java.lang.ClassNotFoundException
public java.util.ArrayList<java.lang.String> listPlugins(java.lang.String pckgname, java.lang.Class tosubclass)
pckgname
- the fully qualified name of the packagetosubclass
- the Class object to inherit from
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.io.IOException
public DatabaseConnector createConnector(java.lang.String name)
name
- - name of the database plugin
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |