Class PerAgentTokenServiceImpl

java.lang.Object
com.atlassian.bamboo.agent.ephemeral.PerAgentTokenServiceImpl
All Implemented Interfaces:
PerAgentTokenService

public class PerAgentTokenServiceImpl extends Object implements PerAgentTokenService
  • Constructor Details

    • PerAgentTokenServiceImpl

      public PerAgentTokenServiceImpl()
  • Method Details

    • generateToken

      @NotNull public @NotNull String generateToken(@NotNull @NotNull String resultKey)
      Description copied from interface: PerAgentTokenService
      Generates token for a given result key.
      Specified by:
      generateToken in interface PerAgentTokenService
      Parameters:
      resultKey - result key
      Returns:
      token
    • isValid

      public boolean isValid(@NotNull @NotNull String resultKey, @NotNull @NotNull String token)
      Description copied from interface: PerAgentTokenService
      Checks if token is valid for a given result key.
      Specified by:
      isValid in interface PerAgentTokenService
      Parameters:
      resultKey - result key
      token - token
      Returns:
      true if token is valid, false otherwise
    • isValidForAnyResultKey

      public boolean isValidForAnyResultKey(@NotNull @NotNull String token)
      Description copied from interface: PerAgentTokenService
      Checks if token is valid for any result key. This method was created to support backward compatibility with the old (non version 5) agent bootstrap.
      Specified by:
      isValidForAnyResultKey in interface PerAgentTokenService
      Parameters:
      token - token
      Returns:
      true if token is valid, false otherwise
    • delete

      public void delete(@NotNull @NotNull String resultKey, @NotNull @NotNull Timestamp dueTimestamp)
      Description copied from interface: PerAgentTokenService
      Deletes all tokens for a given result key created before the passed timestamp.
      Specified by:
      delete in interface PerAgentTokenService
      Parameters:
      resultKey - result key
      dueTimestamp - due timestamp