Package com.atlassian.bamboo.agent
Interface PerAgentTokenService
-
- All Known Implementing Classes:
PerAgentTokenServiceImpl
@PublicApi public interface PerAgentTokenService
- Since:
- 9.3.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods 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
isValidForAnyResultKey(@NotNull String token)
Checks if token is valid for any result key.
-
-
-
Method Detail
-
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 keytoken
- 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
-
-