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
ConstructorDescriptionImmutableRemoteAgentAuthentication
(@NotNull UUID uuid, @NotNull String ip) ImmutableRemoteAgentAuthentication
(@NotNull UUID uuid, @NotNull String ip, boolean approved) -
Method Summary
Modifier and TypeMethodDescriptionint
boolean
long
getId()
getIp()
IP address of the agent requesting approval.getUuid()
UUID of this authentication request.int
hashCode()
boolean
Whether this request was approved, or is still pending approvalboolean
For authentication pending approval this must be full match (equals), otherwise wildcard match will be attempted.boolean
Check if matches given uuid and ip.
-
Constructor Details
-
ImmutableRemoteAgentAuthentication
-
ImmutableRemoteAgentAuthentication
-
ImmutableRemoteAgentAuthentication
-
-
Method Details
-
getUuid
Description copied from interface:RemoteAgentAuthentication
UUID of this authentication request.- Specified by:
getUuid
in interfaceRemoteAgentAuthentication
- Returns:
- UUID
-
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
- Specified by:
getIpPatterns
in interfaceRemoteAgentAuthentication
- Returns:
- list of IP patterns matched for authentication
-
matches
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:
-
matches
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:
-
compareTo
- Specified by:
compareTo
in interfaceComparable<RemoteAgentAuthentication>
-
equals
-
hashCode
public int hashCode() -
getId
public long getId()- Specified by:
getId
in interfaceBambooIdProvider
-