Class WalletArchive

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T extends OracleDataSourceAttributes>
      T
      configure​(T dataSource)
      Configure a data source with the state held in this io.micronaut.oraclecloud.adb.wallet archive.
      java.lang.String serviceAlias()
      Indicates the database service alias (AKA TNS Alias) associated with this io.micronaut.oraclecloud.adb.wallet archive.
      WalletArchive with​(java.lang.String serviceAlias)
      Specialize this io.micronaut.oraclecloud.adb.wallet archive to configure the specified service alias (AKA TNS Alias).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • serviceAlias

        public java.lang.String serviceAlias()
        Indicates the database service alias (AKA TNS Alias) associated with this io.micronaut.oraclecloud.adb.wallet archive. Since a io.micronaut.oraclecloud.adb.wallet may hold multiple sets of database credentials, this value identifies which service will be used to configure a data source via configure(OracleDataSourceAttributes)
        Returns:
        The service alias associated with this io.micronaut.oraclecloud.adb.wallet archive, or null if this io.micronaut.oraclecloud.adb.wallet archive is not associated with a particular service
        See Also:
        with(String)
      • with

        public WalletArchive with​(java.lang.String serviceAlias)
        Specialize this io.micronaut.oraclecloud.adb.wallet archive to configure the specified service alias (AKA TNS Alias). If the archive contains a tnsnames.ora and the connection descriptor for the service alias is used to configure the JDBC url of the OracleDataSourceAttributes
        Parameters:
        serviceAlias - The alias of the database service to configure
        Returns:
        WalletArchive instance that will additionally configure the user credentials and URL for the database
        See Also:
        serviceAlias()
      • configure

        public <T extends OracleDataSourceAttributes> T configure​(T dataSource)
                                                           throws java.io.IOException
        Configure a data source with the state held in this io.micronaut.oraclecloud.adb.wallet archive. If a serviceAlias() has been identified then any database credentials in the io.micronaut.oraclecloud.adb.wallet will be used to configure the data source and the corresponding connection descriptor in tnsnames.ora will be used to configure the JDBC URL.

        If the io.micronaut.oraclecloud.adb.wallet contains a certificate key store and/or trust store these will be used to configure a TLS connection for the data source.

        Specified by:
        configure in interface CanConfigureOracleDataSource
        Type Parameters:
        T - The data source type
        Parameters:
        dataSource - The data source to be configured by this io.micronaut.oraclecloud.adb.wallet
        Returns:
        The supplied data source
        Throws:
        WalletException - if an error occurs accessing the io.micronaut.oraclecloud.adb.wallet
        java.io.IOException - if an error occurs reading the state embodied in this instance