Class StringTokenProviderImpl

  • All Implemented Interfaces:
    DelegationTokenProvider

    public class StringTokenProviderImpl
    extends java.lang.Object
    implements DelegationTokenProvider
    A provider for handling non-JWT, non-empty delegation tokens. Used solely for testing purposes.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean populateToken​(java.lang.String token)
      Populates the object with the specified delegation token.
      java.util.concurrent.CompletableFuture<java.lang.String> retrieveToken()
      Retrieve delegation token.
      void signalTokenExpired()
      Signals the object that the token it may be holding has expired.
      • Methods inherited from class java.lang.Object

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

      • retrieveToken

        public java.util.concurrent.CompletableFuture<java.lang.String> retrieveToken()
        Description copied from interface: DelegationTokenProvider
        Retrieve delegation token.
        Specified by:
        retrieveToken in interface DelegationTokenProvider
        Returns:
        a CompletableFuture that, when completed, will return the retrieved delegation token
      • populateToken

        public boolean populateToken​(java.lang.String token)
        Description copied from interface: DelegationTokenProvider
        Populates the object with the specified delegation token.
        Specified by:
        populateToken in interface DelegationTokenProvider
        Parameters:
        token - the token to populate the object with
        Returns:
        whether the population was successful