Record Class LaunchContext

java.lang.Object
java.lang.Record
io.jenkins.plugins.namespacecloud.launcher.LaunchContext
Record Components:
agentName - the Jenkins node name, also used as the instance label value
agentSecret - the inbound-agent HMAC for agentName; empty for SSH
jenkinsUrl - the externally reachable controller URL
remoteFs - the agent working directory inside the instance

public record LaunchContext(String agentName, String agentSecret, String jenkinsUrl, String remoteFs, AgentTemplate template) extends Record
Everything a launch strategy needs to know about the agent being provisioned, assembled before the Namespace instance is created.
  • Constructor Details

    • LaunchContext

      public LaunchContext(@NonNull String agentName, @NonNull String agentSecret, @NonNull String jenkinsUrl, @NonNull String remoteFs, @NonNull AgentTemplate template)
      Creates an instance of a LaunchContext record class.
      Parameters:
      agentName - the value for the agentName record component
      agentSecret - the value for the agentSecret record component
      jenkinsUrl - the value for the jenkinsUrl record component
      remoteFs - the value for the remoteFs record component
      template - the value for the template record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • agentName

      @NonNull public String agentName()
      Returns the value of the agentName record component.
      Returns:
      the value of the agentName record component
    • agentSecret

      @NonNull public String agentSecret()
      Returns the value of the agentSecret record component.
      Returns:
      the value of the agentSecret record component
    • jenkinsUrl

      @NonNull public String jenkinsUrl()
      Returns the value of the jenkinsUrl record component.
      Returns:
      the value of the jenkinsUrl record component
    • remoteFs

      @NonNull public String remoteFs()
      Returns the value of the remoteFs record component.
      Returns:
      the value of the remoteFs record component
    • template

      @NonNull public AgentTemplate template()
      Returns the value of the template record component.
      Returns:
      the value of the template record component