Class PerAgentTokenServiceImpl
- java.lang.Object
-
- com.atlassian.bamboo.agent.ephemeral.PerAgentTokenServiceImpl
-
- All Implemented Interfaces:
PerAgentTokenService
public class PerAgentTokenServiceImpl extends Object implements PerAgentTokenService
-
-
Constructor Summary
Constructors Constructor Description PerAgentTokenServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete(@NotNull String resultKey, @NotNull Timestamp dueTimestamp)Deletes all tokens for a given result key created before the passed timestamp.@NotNull StringgenerateToken(@NotNull String resultKey)Generates token for a given result key.booleanisValid(@NotNull String resultKey, @NotNull String token)Checks if token is valid for a given result key.booleanisValidForAnyResultKey(@NotNull String token)Checks if token is valid for any result key.
-
-
-
Method Detail
-
generateToken
@NotNull public @NotNull String generateToken(@NotNull @NotNull String resultKey)
Description copied from interface:PerAgentTokenServiceGenerates token for a given result key.- Specified by:
generateTokenin interfacePerAgentTokenService- Parameters:
resultKey- result key- Returns:
- token
-
isValid
public boolean isValid(@NotNull @NotNull String resultKey, @NotNull @NotNull String token)Description copied from interface:PerAgentTokenServiceChecks if token is valid for a given result key.- Specified by:
isValidin interfacePerAgentTokenService- Parameters:
resultKey- result keytoken- token- Returns:
- true if token is valid, false otherwise
-
isValidForAnyResultKey
public boolean isValidForAnyResultKey(@NotNull @NotNull String token)Description copied from interface:PerAgentTokenServiceChecks 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:
isValidForAnyResultKeyin interfacePerAgentTokenService- 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:PerAgentTokenServiceDeletes all tokens for a given result key created before the passed timestamp.- Specified by:
deletein interfacePerAgentTokenService- Parameters:
resultKey- result keydueTimestamp- due timestamp
-
-