|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.firebirdsql.gds.impl.GDSFactory
public class GDSFactory
The class GDSFactory exists to provide a way to obtain objects
implementing GDS and Clumplet.
| Constructor Summary | |
|---|---|
GDSFactory()
|
|
| Method Summary | |
|---|---|
static Class |
getConnectionClass(GDSType gdsType)
Get class extending the AbstractConnection
that will be instantiated when new connection is created. |
static String |
getDatabasePath(GDSType gdsType,
String jdbcUrl)
Get path to the database from the specified JDBC URL. |
static String |
getDatabasePath(GDSType gdsType,
String server,
Integer port,
String path)
Get connection string for the specified server name, port and database name/path. |
static GDS |
getDefaultGDS()
Get an instance of the default GDS implemenation. |
static GDSType |
getDefaultGDSType()
Get default GDS type. |
static GDS |
getGDSForType(GDSType gdsType)
Get an instance of the specified implemenation of GDS. |
static String |
getJdbcUrl(GDSType gdsType,
String databasePath)
Create JDBC URL for the specified GDS type and database path. |
static Set |
getSupportedProtocols()
Get collection of the supported JDBC protocols. |
static GDSType |
getTypeForProtocol(String jdbcUrl)
Get GDS type for the specified JDBC URL. |
static void |
registerPlugin(GDSFactoryPlugin plugin)
Register plugin for this factory. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GDSFactory()
| Method Detail |
|---|
public static void registerPlugin(GDSFactoryPlugin plugin)
plugin - instance of GDSFactoryPlugin to register.public static GDS getDefaultGDS()
GDS implemenation.
GDS instancepublic static GDSType getDefaultGDSType()
GDSType.public static GDS getGDSForType(GDSType gdsType)
GDS.
gdsType - The type of the GDS instance to be returned
GDS implementation of the given type
public static String getDatabasePath(GDSType gdsType,
String server,
Integer port,
String path)
throws GDSException
gdsType - instance of GDSType for which connection string should
be returned.server - name or IP address of the database server, applies only to IPC
and TCP connection modes, in other cases should be
null.port - port on which database server opened listening socket, applies
to TCP connection mode only, may be null.path - database name or path to the database
GDS.iscAttachDatabase(String, IscDbHandle, DatabaseParameterBuffer)
method.
GDSException - if connection string cannot be obtained.
public static String getDatabasePath(GDSType gdsType,
String jdbcUrl)
throws GDSException
gdsType - type of the plugin, to which operation will be delegated to.jdbcUrl - JDBC url from which the database path must be extracted.
GDSException - error when database path cannot be extracted.public static Set getSupportedProtocols()
public static String getJdbcUrl(GDSType gdsType,
String databasePath)
gdsType - type of the plugin, to which operation will be delegated to.databasePath - path to the database.
public static GDSType getTypeForProtocol(String jdbcUrl)
jdbcUrl - JDBC URL for which GDS type should be obtained.
GDSType.public static Class getConnectionClass(GDSType gdsType)
AbstractConnection
that will be instantiated when new connection is created. This method
finds the plugin for the specified type and delegates the call to it.
gdsType - instance of GDSType
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||