Package com.io7m.brooklime.api
Class BLNexusClientConfiguration
java.lang.Object
com.io7m.brooklime.api.BLNexusClientConfiguration
- All Implemented Interfaces:
BLNexusClientConfigurationType
public final class BLNexusClientConfiguration
extends Object
implements BLNexusClientConfigurationType
The client configuration.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeBLNexusClientConfiguration. -
Method Summary
Modifier and TypeMethodDescriptionbaseURI()builder()Creates a builder forBLNexusClientConfiguration.static BLNexusClientConfigurationcopyOf(BLNexusClientConfigurationType instance) Creates an immutable copy of aBLNexusClientConfigurationTypevalue.booleanThis instance is equal to all instances ofBLNexusClientConfigurationthat have equal attribute values.inthashCode()Computes a hash code from attributes:applicationVersion,userName,password,stagingProfileId,baseURI,retryDelay,retryCount.password()inttoString()Prints the immutable valueBLNexusClientConfigurationwith attribute values.userName()Copy the current immutable object by setting a value for theapplicationVersionattribute.withBaseURI(URI value) Copy the current immutable object by setting a value for thebaseURIattribute.withPassword(String value) Copy the current immutable object by setting a value for thepasswordattribute.withRetryCount(int value) Copy the current immutable object by setting a value for theretryCountattribute.withRetryDelay(Duration value) Copy the current immutable object by setting a value for theretryDelayattribute.withStagingProfileId(String value) Copy the current immutable object by setting a value for thestagingProfileIdattribute.withUserName(String value) Copy the current immutable object by setting a value for theuserNameattribute.
-
Method Details
-
applicationVersion
- Specified by:
applicationVersionin interfaceBLNexusClientConfigurationType- Returns:
- The application using the client
-
userName
- Specified by:
userNamein interfaceBLNexusClientConfigurationType- Returns:
- The Nexus username
-
password
- Specified by:
passwordin interfaceBLNexusClientConfigurationType- Returns:
- The Nexus password
-
stagingProfileId
- Specified by:
stagingProfileIdin interfaceBLNexusClientConfigurationType- Returns:
- The Nexus staging profile ID
-
baseURI
- Specified by:
baseURIin interfaceBLNexusClientConfigurationType- Returns:
- The base URI of the Nexus server
-
retryDelay
- Specified by:
retryDelayin interfaceBLNexusClientConfigurationType- Returns:
- The duration by which to pause between failed attempts
-
retryCount
public int retryCount()- Specified by:
retryCountin interfaceBLNexusClientConfigurationType- Returns:
- The maximum number of times to retry requests
-
withApplicationVersion
Copy the current immutable object by setting a value for theapplicationVersionattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for applicationVersion- Returns:
- A modified copy of the
thisobject
-
withUserName
Copy the current immutable object by setting a value for theuserNameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for userName- Returns:
- A modified copy of the
thisobject
-
withPassword
Copy the current immutable object by setting a value for thepasswordattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for password- Returns:
- A modified copy of the
thisobject
-
withStagingProfileId
Copy the current immutable object by setting a value for thestagingProfileIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for stagingProfileId- Returns:
- A modified copy of the
thisobject
-
withBaseURI
Copy the current immutable object by setting a value for thebaseURIattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for baseURI- Returns:
- A modified copy of the
thisobject
-
withRetryDelay
Copy the current immutable object by setting a value for theretryDelayattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for retryDelay- Returns:
- A modified copy of the
thisobject
-
withRetryCount
Copy the current immutable object by setting a value for theretryCountattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for retryCount- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofBLNexusClientConfigurationthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:applicationVersion,userName,password,stagingProfileId,baseURI,retryDelay,retryCount. -
toString
Prints the immutable valueBLNexusClientConfigurationwith attribute values. -
copyOf
Creates an immutable copy of aBLNexusClientConfigurationTypevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable BLNexusClientConfiguration instance
-
builder
Creates a builder forBLNexusClientConfiguration.BLNexusClientConfiguration.builder() .setApplicationVersion(com.io7m.brooklime.api.BLApplicationVersion) // requiredapplicationVersion.setUserName(String) // requireduserName.setPassword(String) // requiredpassword.setStagingProfileId(String) // requiredstagingProfileId.setBaseURI(java.net.URI) // optionalbaseURI.setRetryDelay(java.time.Duration) // requiredretryDelay.setRetryCount(int) // requiredretryCount.build();- Returns:
- A new BLNexusClientConfiguration builder
-