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 int
compareTo(RemoteAgentAuthentication other)
boolean
equals(Object o)
long
getId()
String
getIp()
IP address of the agent requesting approval.Set<String>
getIpPatterns()
UUID
getUuid()
UUID of this authentication request.int
hashCode()
boolean
isApproved()
Whether this request was approved, or is still pending approvalboolean
matches(@NotNull String ip)
For authentication pending approval this must be full match (equals), otherwise wildcard match will be attempted.boolean
matches(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:RemoteAgentAuthentication
UUID of this authentication request.- Specified by:
getUuid
in interfaceRemoteAgentAuthentication
- Returns:
- UUID
-
getIp
public String getIp()
Description copied from interface:RemoteAgentAuthentication
IP address of the agent requesting approval. May contain multiple addresses (coma separated) if agent connects through proxy- Specified by:
getIp
in interfaceRemoteAgentAuthentication
- Returns:
- IP address of the remote agent
-
isApproved
public boolean isApproved()
Description copied from interface:RemoteAgentAuthentication
Whether this request was approved, or is still pending approval- Specified by:
isApproved
in interfaceRemoteAgentAuthentication
- Returns:
true
, if this authentication request has been approved
-
getIpPatterns
public Set<String> getIpPatterns()
- Specified by:
getIpPatterns
in 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:
compareTo
in interfaceComparable<RemoteAgentAuthentication>
-
getId
public long getId()
- Specified by:
getId
in interfaceBambooIdProvider
-
-