Class PerAgentTokenServiceImpl
java.lang.Object
com.atlassian.bamboo.agent.ephemeral.PerAgentTokenServiceImpl
- All Implemented Interfaces:
PerAgentTokenService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDeletes all tokens for a given result key created before the passed timestamp.@NotNull StringgenerateToken(@NotNull String resultKey) Generates token for a given result key.booleanChecks if token is valid for a given result key.booleanisValidForAnyResultKey(@NotNull String token) Checks if token is valid for any result key.
-
Constructor Details
-
PerAgentTokenServiceImpl
public PerAgentTokenServiceImpl()
-
-
Method Details
-
generateToken
Description copied from interface:PerAgentTokenServiceGenerates token for a given result key.- Specified by:
generateTokenin interfacePerAgentTokenService- Parameters:
resultKey- result key- Returns:
- token
-
isValid
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
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
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
-