Package org.xipki.datasource
Class DataSourceFactory
- java.lang.Object
-
- org.xipki.datasource.DataSourceFactory
-
public class DataSourceFactory extends java.lang.ObjectFactory to createDataSourceWrapper.- Since:
- 2.0.0
- Author:
- Lijun Liao (xipki)
-
-
Constructor Summary
Constructors Constructor Description DataSourceFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DataSourceWrappercreateDataSource(java.lang.String name, java.io.InputStream conf)Create aDataSourceWrapperfrom the configuration stored in the input stream.DataSourceWrappercreateDataSource(java.lang.String name, org.xipki.util.ConfigurableProperties conf)DataSourceWrappercreateDataSource(java.lang.String name, org.xipki.util.FileOrValue conf)DataSourceWrappercreateDataSourceForFile(java.lang.String name, java.lang.String confFile)
-
-
-
Method Detail
-
createDataSource
public DataSourceWrapper createDataSource(java.lang.String name, org.xipki.util.FileOrValue conf) throws java.io.IOException, org.xipki.util.exception.InvalidConfException
- Throws:
java.io.IOExceptionorg.xipki.util.exception.InvalidConfException
-
createDataSource
public DataSourceWrapper createDataSource(java.lang.String name, java.io.InputStream conf) throws java.io.IOException, org.xipki.util.exception.InvalidConfException
Create aDataSourceWrapperfrom the configuration stored in the input stream. The specified stream remains open after this method returns.- Parameters:
name- the datasource nameconf- the configuration- Returns:
- the created datasource wrapper.
- Throws:
java.io.IOException- if IO error occurs while reading the input sstream.org.xipki.util.exception.InvalidConfException
-
createDataSource
public DataSourceWrapper createDataSource(java.lang.String name, org.xipki.util.ConfigurableProperties conf) throws org.xipki.util.exception.InvalidConfException
- Throws:
org.xipki.util.exception.InvalidConfException
-
createDataSourceForFile
public DataSourceWrapper createDataSourceForFile(java.lang.String name, java.lang.String confFile) throws java.io.IOException, org.xipki.util.exception.InvalidConfException
- Throws:
java.io.IOExceptionorg.xipki.util.exception.InvalidConfException
-
-