Class PerAgentTokenServiceImpl
java.lang.Object
com.atlassian.bamboo.agent.ephemeral.PerAgentTokenServiceImpl
- All Implemented Interfaces:
PerAgentTokenService
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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
Checks if token is valid for a given result key.boolean
isValidForAnyResultKey
(@NotNull String token) Checks if token is valid for any result key.
-
Constructor Details
-
PerAgentTokenServiceImpl
public PerAgentTokenServiceImpl()
-
-
Method Details
-
generateToken
Description copied from interface:PerAgentTokenService
Generates token for a given result key.- Specified by:
generateToken
in interfacePerAgentTokenService
- Parameters:
resultKey
- result key- Returns:
- token
-
isValid
Description copied from interface:PerAgentTokenService
Checks if token is valid for a given result key.- Specified by:
isValid
in interfacePerAgentTokenService
- Parameters:
resultKey
- result keytoken
- token- Returns:
- true if token is valid, false otherwise
-
isValidForAnyResultKey
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 interfacePerAgentTokenService
- Parameters:
token
- token- Returns:
- true if token is valid, false otherwise
-
delete
Description copied from interface:PerAgentTokenService
Deletes all tokens for a given result key created before the passed timestamp.- Specified by:
delete
in interfacePerAgentTokenService
- Parameters:
resultKey
- result keydueTimestamp
- due timestamp
-