Package com.atlassian.bamboo.buildqueue
Class ImmutableRemoteAgentAuthentication
- java.lang.Object
-
- com.atlassian.bamboo.buildqueue.ImmutableRemoteAgentAuthentication
-
- All Implemented Interfaces:
RemoteAgentAuthentication,BambooIdProvider,Comparable<RemoteAgentAuthentication>
public class ImmutableRemoteAgentAuthentication extends Object implements Comparable<RemoteAgentAuthentication>, RemoteAgentAuthentication
Immutable business object representing remote agent authentication request.- Since:
- 3.4
-
-
Constructor Summary
Constructors Constructor Description ImmutableRemoteAgentAuthentication(@NotNull UUID uuid, @NotNull String ip)ImmutableRemoteAgentAuthentication(@NotNull UUID uuid, @NotNull String ip, boolean approved)ImmutableRemoteAgentAuthentication(RemoteAgentAuthenticationEntity entity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(RemoteAgentAuthentication other)booleanequals(Object o)longgetId()StringgetIp()IP address of the agent requesting approval.Set<String>getIpPatterns()UUIDgetUuid()UUID of this authentication request.inthashCode()booleanisApproved()Whether this request was approved, or is still pending approvalbooleanmatches(@NotNull String ip)For authentication pending approval this must be full match (equals), otherwise wildcard match will be attempted.booleanmatches(UUID uuid, String ip)Check if matches given uuid and ip.
-
-
-
Constructor Detail
-
ImmutableRemoteAgentAuthentication
public ImmutableRemoteAgentAuthentication(@NotNull @NotNull UUID uuid, @NotNull @NotNull String ip)
-
ImmutableRemoteAgentAuthentication
public ImmutableRemoteAgentAuthentication(@NotNull @NotNull UUID uuid, @NotNull @NotNull String ip, boolean approved)
-
ImmutableRemoteAgentAuthentication
public ImmutableRemoteAgentAuthentication(RemoteAgentAuthenticationEntity entity)
-
-
Method Detail
-
getUuid
public UUID getUuid()
Description copied from interface:RemoteAgentAuthenticationUUID of this authentication request.- Specified by:
getUuidin interfaceRemoteAgentAuthentication- Returns:
- UUID
-
getIp
public String getIp()
Description copied from interface:RemoteAgentAuthenticationIP address of the agent requesting approval. May contain multiple addresses (coma separated) if agent connects through proxy- Specified by:
getIpin interfaceRemoteAgentAuthentication- Returns:
- IP address of the remote agent
-
isApproved
public boolean isApproved()
Description copied from interface:RemoteAgentAuthenticationWhether this request was approved, or is still pending approval- Specified by:
isApprovedin interfaceRemoteAgentAuthentication- Returns:
true, if this authentication request has been approved
-
getIpPatterns
public Set<String> getIpPatterns()
- Specified by:
getIpPatternsin interfaceRemoteAgentAuthentication- Returns:
- list of IP patterns matched for authentication
-
matches
public boolean matches(@NotNull @NotNull String ip)For authentication pending approval this must be full match (equals), otherwise wildcard match will be attempted.- Parameters:
ip- IP address to match- Returns:
true, if this authentication matches ip- See Also:
RemoteAgentAuthentications.matching(String)
-
matches
public boolean matches(UUID uuid, String ip)
Check if matches given uuid and ip. UUID must be exactly equal to this authentication's UUID and the ip must match as permatches(String).- Parameters:
uuid- UUIDip- IP- Returns:
true, if this authentication matches given uuid and ip- See Also:
RemoteAgentAuthentications.matching(java.util.UUID, String)
-
compareTo
public int compareTo(RemoteAgentAuthentication other)
- Specified by:
compareToin interfaceComparable<RemoteAgentAuthentication>
-
getId
public long getId()
- Specified by:
getIdin interfaceBambooIdProvider
-
-