Class DataSourceFactory


  • public class DataSourceFactory
    extends java.lang.Object
    Factory to create DataSourceWrapper.
    Since:
    2.0.0
    Author:
    Lijun Liao (xipki)
    • Constructor Detail

      • DataSourceFactory

        public DataSourceFactory()
    • 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.IOException
        org.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 a DataSourceWrapper from the configuration stored in the input stream. The specified stream remains open after this method returns.
        Parameters:
        name - the datasource name
        conf - 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.IOException
        org.xipki.util.exception.InvalidConfException