Class ValidationRequest.Builder
java.lang.Object
dev.demeng.sentinel.client.license.validation.ValidationRequest.Builder
- Enclosing class:
- ValidationRequest
Builder for constructing
ValidationRequest instances.
The product must be identified either by product(String) or by the pair listingPlatform(String) + listingResourceId(String); the server rejects requests
that supply neither or both.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds and returns a newValidationRequest.connectionPlatform(String connectionPlatform) Sets the connection platform (e.g.connectionValue(String connectionValue) Sets the connection value (e.g.Sets the client IP address.Sets the license key to validate.listingPlatform(String listingPlatform) Sets the platform on which the product is listed (e.g.listingResourceId(String listingResourceId) Sets the platform-side resource ID for the listing (e.g.Sets the product identifier.Sets the server identifier.
-
Method Details
-
key
Sets the license key to validate.- Parameters:
key- the license key- Returns:
- this builder
-
product
Sets the product identifier. Mutually exclusive withlistingPlatform(String)+listingResourceId(String).- Parameters:
product- the product identifier- Returns:
- this builder
-
server
Sets the server identifier. If not set, defaults to the machine fingerprint generated byMachineFingerprint.generate().- Parameters:
server- the server identifier- Returns:
- this builder
-
ip
Sets the client IP address.- Parameters:
ip- the client IP address- Returns:
- this builder
-
connectionPlatform
Sets the connection platform (e.g."discord").- Parameters:
connectionPlatform- the connection platform- Returns:
- this builder
-
connectionValue
Sets the connection value (e.g. a Discord user ID).- Parameters:
connectionValue- the connection value- Returns:
- this builder
-
listingPlatform
Sets the platform on which the product is listed (e.g."Spigot"). Must be paired withlistingResourceId(String)and is mutually exclusive withproduct(String).- Parameters:
listingPlatform- the listing platform name- Returns:
- this builder
-
listingResourceId
Sets the platform-side resource ID for the listing (e.g. a Spigot resource ID). Must be paired withlistingPlatform(String)and is mutually exclusive withproduct(String).- Parameters:
listingResourceId- the listing resource ID- Returns:
- this builder
-
build
Builds and returns a newValidationRequest. Product identification is not validated here; the server rejects requests that supply neither or both identification methods.- Returns:
- a configured request instance
-