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.
  • Method Details

    • applicationVersion

      public BLApplicationVersion applicationVersion()
      Specified by:
      applicationVersion in interface BLNexusClientConfigurationType
      Returns:
      The application using the client
    • userName

      public String userName()
      Specified by:
      userName in interface BLNexusClientConfigurationType
      Returns:
      The Nexus username
    • password

      public String password()
      Specified by:
      password in interface BLNexusClientConfigurationType
      Returns:
      The Nexus password
    • stagingProfileId

      public String stagingProfileId()
      Specified by:
      stagingProfileId in interface BLNexusClientConfigurationType
      Returns:
      The Nexus staging profile ID
    • baseURI

      public URI baseURI()
      Specified by:
      baseURI in interface BLNexusClientConfigurationType
      Returns:
      The base URI of the Nexus server
    • retryDelay

      public Duration retryDelay()
      Specified by:
      retryDelay in interface BLNexusClientConfigurationType
      Returns:
      The duration by which to pause between failed attempts
    • retryCount

      public int retryCount()
      Specified by:
      retryCount in interface BLNexusClientConfigurationType
      Returns:
      The maximum number of times to retry requests
    • withApplicationVersion

      public final BLNexusClientConfiguration withApplicationVersion(BLApplicationVersion value)
      Copy the current immutable object by setting a value for the applicationVersion attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for applicationVersion
      Returns:
      A modified copy of the this object
    • withUserName

      public final BLNexusClientConfiguration withUserName(String value)
      Copy the current immutable object by setting a value for the userName attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for userName
      Returns:
      A modified copy of the this object
    • withPassword

      public final BLNexusClientConfiguration withPassword(String value)
      Copy the current immutable object by setting a value for the password attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for password
      Returns:
      A modified copy of the this object
    • withStagingProfileId

      public final BLNexusClientConfiguration withStagingProfileId(String value)
      Copy the current immutable object by setting a value for the stagingProfileId attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for stagingProfileId
      Returns:
      A modified copy of the this object
    • withBaseURI

      public final BLNexusClientConfiguration withBaseURI(URI value)
      Copy the current immutable object by setting a value for the baseURI attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for baseURI
      Returns:
      A modified copy of the this object
    • withRetryDelay

      public final BLNexusClientConfiguration withRetryDelay(Duration value)
      Copy the current immutable object by setting a value for the retryDelay attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for retryDelay
      Returns:
      A modified copy of the this object
    • withRetryCount

      public final BLNexusClientConfiguration withRetryCount(int value)
      Copy the current immutable object by setting a value for the retryCount attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for retryCount
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of BLNexusClientConfiguration that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: applicationVersion, userName, password, stagingProfileId, baseURI, retryDelay, retryCount.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value BLNexusClientConfiguration with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      Creates an immutable copy of a BLNexusClientConfigurationType value. 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

      public static BLNexusClientConfiguration.Builder builder()
      Creates a builder for BLNexusClientConfiguration.
       BLNexusClientConfiguration.builder()
          .setApplicationVersion(com.io7m.brooklime.api.BLApplicationVersion) // required applicationVersion
          .setUserName(String) // required userName
          .setPassword(String) // required password
          .setStagingProfileId(String) // required stagingProfileId
          .setBaseURI(java.net.URI) // optional baseURI
          .setRetryDelay(java.time.Duration) // required retryDelay
          .setRetryCount(int) // required retryCount
          .build();
       
      Returns:
      A new BLNexusClientConfiguration builder