Class VaultTokenBase.Builder<B extends VaultTokenBase.Builder<B,​T>,​T>

  • Type Parameters:
    B - type of builder
    T - type of token
    All Implemented Interfaces:
    Builder<T>, Supplier<T>
    Direct Known Subclasses:
    VaultToken.Builder
    Enclosing class:
    VaultTokenBase

    public abstract static class VaultTokenBase.Builder<B extends VaultTokenBase.Builder<B,​T>,​T>
    extends Object
    implements Builder<T>
    Base builder class for tokens.
    • Constructor Detail

      • Builder

        protected Builder()
    • Method Detail

      • created

        public B created​(Instant created)
        When the token was created.
        Parameters:
        created - instant the token was created
        Returns:
        updated builder
      • token

        public B token​(String token)
        The token to use (actual string representing the token).
        Parameters:
        token - token string
        Returns:
        updated builder
      • leaseDuration

        public B leaseDuration​(Duration leaseDuration)
        Lease duration.
        Parameters:
        leaseDuration - lease duration, such as Duration.ofHours(long).
        Returns:
        updated builder
      • renewable

        public B renewable​(boolean renewable)
        Whether the token is renewable or not.
        Parameters:
        renewable - true for a renewable token
        Returns:
        updated builder
      • me

        protected B me()
      • created

        protected Instant created()
      • token

        protected String token()
      • leaseDuration

        protected Duration leaseDuration()
      • renewable

        protected boolean renewable()