Package com.io7m.brooklime.api
Class BLNexusClientConfiguration
java.lang.Object
com.io7m.brooklime.api.BLNexusClientConfiguration
- All Implemented Interfaces:
BLNexusClientConfigurationType
public final class BLNexusClientConfiguration extends java.lang.Object implements BLNexusClientConfigurationType
The client configuration.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBLNexusClientConfiguration.BuilderBuilds instances of typeBLNexusClientConfiguration. -
Method Summary
Modifier and Type Method Description BLApplicationVersionapplicationVersion()java.net.URIbaseURI()static BLNexusClientConfiguration.Builderbuilder()Creates a builder forBLNexusClientConfiguration.static BLNexusClientConfigurationcopyOf(BLNexusClientConfigurationType instance)Creates an immutable copy of aBLNexusClientConfigurationTypevalue.booleanequals(java.lang.Object another)This 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.java.lang.Stringpassword()intretryCount()java.time.DurationretryDelay()java.lang.StringstagingProfileId()java.lang.StringtoString()Prints the immutable valueBLNexusClientConfigurationwith attribute values.java.lang.StringuserName()BLNexusClientConfigurationwithApplicationVersion(BLApplicationVersion value)Copy the current immutable object by setting a value for theapplicationVersionattribute.BLNexusClientConfigurationwithBaseURI(java.net.URI value)Copy the current immutable object by setting a value for thebaseURIattribute.BLNexusClientConfigurationwithPassword(java.lang.String value)Copy the current immutable object by setting a value for thepasswordattribute.BLNexusClientConfigurationwithRetryCount(int value)Copy the current immutable object by setting a value for theretryCountattribute.BLNexusClientConfigurationwithRetryDelay(java.time.Duration value)Copy the current immutable object by setting a value for theretryDelayattribute.BLNexusClientConfigurationwithStagingProfileId(java.lang.String value)Copy the current immutable object by setting a value for thestagingProfileIdattribute.BLNexusClientConfigurationwithUserName(java.lang.String value)Copy the current immutable object by setting a value for theuserNameattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Method Details
-
applicationVersion
- Specified by:
applicationVersionin interfaceBLNexusClientConfigurationType- Returns:
- The application using the client
-
userName
public java.lang.String userName()- Specified by:
userNamein interfaceBLNexusClientConfigurationType- Returns:
- The Nexus username
-
password
public java.lang.String password()- Specified by:
passwordin interfaceBLNexusClientConfigurationType- Returns:
- The Nexus password
-
stagingProfileId
public java.lang.String stagingProfileId()- Specified by:
stagingProfileIdin interfaceBLNexusClientConfigurationType- Returns:
- The Nexus staging profile ID
-
baseURI
public java.net.URI baseURI()- Specified by:
baseURIin interfaceBLNexusClientConfigurationType- Returns:
- The base URI of the Nexus server
-
retryDelay
public java.time.Duration 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
public boolean equals(java.lang.Object another)This instance is equal to all instances ofBLNexusClientConfigurationthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()Computes a hash code from attributes:applicationVersion,userName,password,stagingProfileId,baseURI,retryDelay,retryCount.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueBLNexusClientConfigurationwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
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
-