Package org.jenkinsci.remoting.engine
Class JnlpClientDatabase
- java.lang.Object
-
- org.jenkinsci.remoting.engine.JnlpClientDatabase
-
public abstract class JnlpClientDatabase extends Object
Represents a database of clients that are permitted to connect.- Since:
- 3.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JnlpClientDatabase.ValidationResult
The types of certificate validation results.
-
Constructor Summary
Constructors Constructor Description JnlpClientDatabase()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract boolean
exists(String clientName)
Check if the supplied client name exists.abstract String
getSecretOf(String clientName)
Gets the secret for the supplied client name.JnlpClientDatabase.ValidationResult
validateCertificate(String clientName, X509Certificate certificate)
Performs client certificate validation.
-
-
-
Method Detail
-
exists
public abstract boolean exists(String clientName)
Check if the supplied client name exists.- Parameters:
clientName
- the client name.- Returns:
true
if and only if the named client exists.
-
getSecretOf
public abstract String getSecretOf(@NonNull String clientName)
Gets the secret for the supplied client name.- Parameters:
clientName
- the client name.- Returns:
- the secret or
null
. Should not returnnull
ifexists(String)
but this may occur if there is a race between establishing a connection and the client being removed from the database.
-
validateCertificate
@NonNull public JnlpClientDatabase.ValidationResult validateCertificate(@NonNull String clientName, @NonNull X509Certificate certificate)
Performs client certificate validation.- Parameters:
clientName
- the client name.certificate
- the certificate.- Returns:
- the validation.
-
-