Class SessionTokenMethodConfig.BuilderBase<BUILDER extends SessionTokenMethodConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends SessionTokenMethodConfig>

java.lang.Object
io.helidon.integrations.oci.SessionTokenMethodConfig.BuilderBase<BUILDER,PROTOTYPE>
Type Parameters:
BUILDER - type of the builder extending this abstract builder
PROTOTYPE - type of the prototype interface that would be built by Prototype.Builder.buildPrototype()
All Implemented Interfaces:
Prototype.Builder<BUILDER,PROTOTYPE>, Prototype.ConfiguredBuilder<BUILDER,PROTOTYPE>
Direct Known Subclasses:
SessionTokenMethodConfig.Builder
Enclosing interface:
SessionTokenMethodConfig

public abstract static class SessionTokenMethodConfig.BuilderBase<BUILDER extends SessionTokenMethodConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends SessionTokenMethodConfig> extends Object implements Prototype.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for SessionTokenMethodConfig.
  • Constructor Details

    • BuilderBase

      protected BuilderBase()
      Protected to support extensibility.
  • Method Details

    • from

      public BUILDER from(SessionTokenMethodConfig prototype)
      Update this builder from an existing prototype instance. This method disables automatic service discovery.
      Parameters:
      prototype - existing prototype to update this builder from
      Returns:
      updated builder instance
    • from

      public BUILDER from(SessionTokenMethodConfig.BuilderBase<?,?> builder)
      Update this builder from an existing prototype builder instance.
      Parameters:
      builder - existing builder prototype to update this builder from
      Returns:
      updated builder instance
    • config

      public BUILDER config(Config config)
      Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.
      Specified by:
      config in interface Prototype.ConfiguredBuilder<BUILDER extends SessionTokenMethodConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends SessionTokenMethodConfig>
      Parameters:
      config - configuration instance used to obtain values to update this builder
      Returns:
      updated builder instance
    • region

      public BUILDER region(String region)
      The OCI region.
      Parameters:
      region - the OCI region
      Returns:
      updated builder instance
      See Also:
    • fingerprint

      public BUILDER fingerprint(String fingerprint)
      The OCI authentication fingerprint.

      This configuration property must be provided in order to set the API signing key's fingerprint. See SimpleAuthenticationDetailsProvider.getFingerprint() for more details.

      Parameters:
      fingerprint - the OCI authentication fingerprint
      Returns:
      updated builder instance
      See Also:
    • clearPassphrase

      public BUILDER clearPassphrase()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • passphrase

      public BUILDER passphrase(char[] passphrase)
      The OCI authentication passphrase.

      This property must be provided in order to set the SimpleAuthenticationDetailsProvider.getPassphraseCharacters().

      Parameters:
      passphrase - the OCI authentication passphrase
      Returns:
      updated builder instance
      See Also:
    • passphrase

      public BUILDER passphrase(String passphrase)
      The OCI authentication passphrase.

      This property must be provided in order to set the SimpleAuthenticationDetailsProvider.getPassphraseCharacters().

      Parameters:
      passphrase - the OCI authentication passphrase
      Returns:
      updated builder instance
      See Also:
    • tenantId

      public BUILDER tenantId(String tenantId)
      The OCI tenant id.

      This property must be provided in order to set the SimpleAuthenticationDetailsProvider.getTenantId().

      Parameters:
      tenantId - the OCI tenant id
      Returns:
      updated builder instance
      See Also:
    • userId

      public BUILDER userId(String userId)
      The OCI user id.

      This property must be provided in order to set the SimpleAuthenticationDetailsProvider.getUserId().

      Parameters:
      userId - the OCI user id
      Returns:
      updated builder instance
      See Also:
    • clearPrivateKeyPath

      public BUILDER clearPrivateKeyPath()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • privateKeyPath

      public BUILDER privateKeyPath(Path privateKeyPath)
      The OCI authentication private key resource. A resource can be defined as a resource on classpath, file on the file system, base64 encoded text value in config, or plain-text value in config.

      If not defined, we will use ".oci/sessions/DEFAULT/oci_api_key.pem file in user home directory.

      Parameters:
      privateKeyPath - the OCI authentication key file
      Returns:
      updated builder instance
      See Also:
    • clearSessionTokenPath

      public BUILDER clearSessionTokenPath()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • sessionTokenPath

      public BUILDER sessionTokenPath(Path sessionTokenPath)
      Session token path. If both this value, and sessionToken() is defined, the value of sessionToken() is used.
      Parameters:
      sessionTokenPath - session token path
      Returns:
      updated builder instance
      See Also:
    • clearSessionToken

      public BUILDER clearSessionToken()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • sessionToken

      public BUILDER sessionToken(String sessionToken)
      Session token value. If both this value, and sessionTokenPath() is defined, this value is used.
      Parameters:
      sessionToken - session token
      Returns:
      updated builder instance
      See Also:
    • clearInitialRefreshDelay

      public BUILDER clearInitialRefreshDelay()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • initialRefreshDelay

      public BUILDER initialRefreshDelay(Duration initialRefreshDelay)
      Delay of the first refresh. Defaults to 0, to refresh immediately (implemented in the authentication details provider).
      Parameters:
      initialRefreshDelay - initial refresh delay
      Returns:
      updated builder instance
      See Also:
    • clearRefreshPeriod

      public BUILDER clearRefreshPeriod()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • refreshPeriod

      public BUILDER refreshPeriod(Duration refreshPeriod)
      Refresh period, i.e. how often refresh occurs. Defaults to 55 minutes (implemented in the authentication details provider).
      Parameters:
      refreshPeriod - refresh period
      Returns:
      updated builder instance
      See Also:
    • clearSessionLifetimeHours

      public BUILDER clearSessionLifetimeHours()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • sessionLifetimeHours

      public BUILDER sessionLifetimeHours(long sessionLifetimeHours)
      Maximal lifetime of a session. Defaults to (and maximum is) 24 hours. Can only be set to a lower value.
      Parameters:
      sessionLifetimeHours - lifetime of a session in hours
      Returns:
      updated builder instance
      See Also:
    • clearScheduler

      public BUILDER clearScheduler()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • scheduler

      public BUILDER scheduler(ScheduledExecutorService scheduler)
      Customize the scheduled executor service to use for scheduling. Defaults to a single thread executor service.
      Parameters:
      scheduler - scheduled executor service
      Returns:
      updated builder instance
      See Also:
    • region

      public Optional<String> region()
      The OCI region.
      Returns:
      the region
    • fingerprint

      public Optional<String> fingerprint()
      The OCI authentication fingerprint.

      This configuration property must be provided in order to set the API signing key's fingerprint. See SimpleAuthenticationDetailsProvider.getFingerprint() for more details.

      Returns:
      the fingerprint
    • passphrase

      public Optional<char[]> passphrase()
      The OCI authentication passphrase.

      This property must be provided in order to set the SimpleAuthenticationDetailsProvider.getPassphraseCharacters().

      Returns:
      the passphrase
    • tenantId

      public Optional<String> tenantId()
      The OCI tenant id.

      This property must be provided in order to set the SimpleAuthenticationDetailsProvider.getTenantId().

      Returns:
      the tenant id
    • userId

      public Optional<String> userId()
      The OCI user id.

      This property must be provided in order to set the SimpleAuthenticationDetailsProvider.getUserId().

      Returns:
      the user id
    • privateKeyPath

      public Optional<Path> privateKeyPath()
      The OCI authentication private key resource. A resource can be defined as a resource on classpath, file on the file system, base64 encoded text value in config, or plain-text value in config.

      If not defined, we will use ".oci/sessions/DEFAULT/oci_api_key.pem file in user home directory.

      Returns:
      the private key path
    • sessionTokenPath

      public Optional<Path> sessionTokenPath()
      Session token path. If both this value, and sessionToken() is defined, the value of sessionToken() is used.
      Returns:
      the session token path
    • sessionToken

      public Optional<String> sessionToken()
      Session token value. If both this value, and sessionTokenPath() is defined, this value is used.
      Returns:
      the session token
    • initialRefreshDelay

      public Optional<Duration> initialRefreshDelay()
      Delay of the first refresh. Defaults to 0, to refresh immediately (implemented in the authentication details provider).
      Returns:
      the initial refresh delay
      See Also:
      • SessionTokenAuthenticationDetailsProvider.SessionTokenAuthenticationDetailsProviderBuilder.initialRefreshDelay(long)
    • refreshPeriod

      public Optional<Duration> refreshPeriod()
      Refresh period, i.e. how often refresh occurs. Defaults to 55 minutes (implemented in the authentication details provider).
      Returns:
      the refresh period
      See Also:
      • SessionTokenAuthenticationDetailsProvider.SessionTokenAuthenticationDetailsProviderBuilder.refreshPeriod(long)
    • sessionLifetimeHours

      public Optional<Long> sessionLifetimeHours()
      Maximal lifetime of a session. Defaults to (and maximum is) 24 hours. Can only be set to a lower value.
      Returns:
      the session lifetime hours
    • scheduler

      public Optional<ScheduledExecutorService> scheduler()
      Customize the scheduled executor service to use for scheduling. Defaults to a single thread executor service.
      Returns:
      the scheduler
    • config

      public Optional<Config> config()
      If this instance was configured, this would be the config instance used.
      Returns:
      config node used to configure this builder, or empty if not configured
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • preBuildPrototype

      protected void preBuildPrototype()
      Handles providers and decorators.
    • validatePrototype

      protected void validatePrototype()
      Validates required properties.