Class WalletArchive
- java.lang.Object
-
- io.micronaut.oraclecloud.atp.wallet.WalletArchive
-
- All Implemented Interfaces:
CanConfigureOracleDataSource
public class WalletArchive extends java.lang.Object implements CanConfigureOracleDataSource
Represents a Zip archive containing at least acwallet.sso
orewallet.p12
and optionally atnsnames.ora
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends OracleDataSourceAttributes>
Tconfigure(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
-
Methods inherited from interface io.micronaut.oraclecloud.atp.wallet.datasource.CanConfigureOracleDataSource
configure
-
-
-
-
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 viaconfigure(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 atnsnames.ora
and the connection descriptor for the service alias is used to configure the JDBC url of theOracleDataSourceAttributes
- 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 aserviceAlias()
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 intnsnames.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 interfaceCanConfigureOracleDataSource
- 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.walletjava.io.IOException
- if an error occurs reading the state embodied in this instance
-
-