Interface PerAgentTokenService

All Known Implementing Classes:
PerAgentTokenServiceImpl

@PublicApi public interface PerAgentTokenService
Since:
9.3.1
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    delete(@NotNull String resultKey, @NotNull Timestamp dueTimestamp)
    Deletes all tokens for a given result key created before the passed timestamp.
    @NotNull String
    generateToken(@NotNull String resultKey)
    Generates token for a given result key.
    boolean
    isValid(@NotNull String resultKey, @NotNull String token)
    Checks if token is valid for a given result key.
    boolean
    Checks if token is valid for any result key.
  • Method Details

    • generateToken

      @NotNull @NotNull String generateToken(@NotNull @NotNull String resultKey)
      Generates token for a given result key.
      Parameters:
      resultKey - result key
      Returns:
      token
    • isValid

      boolean isValid(@NotNull @NotNull String resultKey, @NotNull @NotNull String token)
      Checks if token is valid for a given result key.
      Parameters:
      resultKey - result key
      token - token
      Returns:
      true if token is valid, false otherwise
    • isValidForAnyResultKey

      boolean isValidForAnyResultKey(@NotNull @NotNull String token)
      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.
      Parameters:
      token - token
      Returns:
      true if token is valid, false otherwise
    • delete

      void delete(@NotNull @NotNull String resultKey, @NotNull @NotNull Timestamp dueTimestamp)
      Deletes all tokens for a given result key created before the passed timestamp.
      Parameters:
      resultKey - result key
      dueTimestamp - due timestamp