Record Class WSConnectionSettingsResource

java.lang.Object
java.lang.Record
com.inductiveautomation.ignition.gateway.gan.WSConnectionSettingsResource
Record Components:
host - The remote host to connect to
port - The remote port to connect to
useSSL - Whether to use SSL for the connection
pingRateMillis - The rate at which to send ping messages
pingTimeoutMillis - The timeout for a ping message
pingMaxMissed - The maximum number of missed pings before the connection is considered lost
wsTimeoutMillis - The timeout for the websocket connection
httpConnectTimeoutMillis - The timeout for the HTTP connection
httpReadTimeoutMillis - The timeout for reading from the HTTP connection
sendThreads - The number of threads to use for sending messages
receiveThreads - The number of threads to use for receiving messages

public record WSConnectionSettingsResource(String host, Integer port, Boolean useSSL, Integer pingRateMillis, Integer pingTimeoutMillis, Integer pingMaxMissed, Integer wsTimeoutMillis, Integer httpConnectTimeoutMillis, Integer httpReadTimeoutMillis, Integer sendThreads, Integer receiveThreads) extends Record
A resource that holds settings for an outgoing Gateway Network connection. Notably, this is a named resource which did not have a name in the previous PersistentRecord implementation, so the resource name is constructed as host_port.
  • Field Details

  • Constructor Details

    • WSConnectionSettingsResource

      public WSConnectionSettingsResource(String host, Integer port, Boolean useSSL, Integer pingRateMillis, Integer pingTimeoutMillis, Integer pingMaxMissed, Integer wsTimeoutMillis, Integer httpConnectTimeoutMillis, Integer httpReadTimeoutMillis, Integer sendThreads, Integer receiveThreads)
      Creates an instance of a WSConnectionSettingsResource record class.
      Parameters:
      host - the value for the host record component
      port - the value for the port record component
      useSSL - the value for the useSSL record component
      pingRateMillis - the value for the pingRateMillis record component
      pingTimeoutMillis - the value for the pingTimeoutMillis record component
      pingMaxMissed - the value for the pingMaxMissed record component
      wsTimeoutMillis - the value for the wsTimeoutMillis record component
      httpConnectTimeoutMillis - the value for the httpConnectTimeoutMillis record component
      httpReadTimeoutMillis - the value for the httpReadTimeoutMillis record component
      sendThreads - the value for the sendThreads record component
      receiveThreads - the value for the receiveThreads record component
  • Method Details

    • getAllProperties

      public Properties getAllProperties(int index)
      Returns a Properties object that can be used to completely recreate a WSConnectionSettingsResource from properties. Use the index to set which gan connection this represents in a file with many gan connections; e.g if the index is 0, then a property might be 'gateway.network.0.Host=localhost'
    • 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.
    • host

      public String host()
      Returns the value of the host record component.
      Returns:
      the value of the host record component
    • port

      public Integer port()
      Returns the value of the port record component.
      Returns:
      the value of the port record component
    • useSSL

      public Boolean useSSL()
      Returns the value of the useSSL record component.
      Returns:
      the value of the useSSL record component
    • pingRateMillis

      public Integer pingRateMillis()
      Returns the value of the pingRateMillis record component.
      Returns:
      the value of the pingRateMillis record component
    • pingTimeoutMillis

      public Integer pingTimeoutMillis()
      Returns the value of the pingTimeoutMillis record component.
      Returns:
      the value of the pingTimeoutMillis record component
    • pingMaxMissed

      public Integer pingMaxMissed()
      Returns the value of the pingMaxMissed record component.
      Returns:
      the value of the pingMaxMissed record component
    • wsTimeoutMillis

      public Integer wsTimeoutMillis()
      Returns the value of the wsTimeoutMillis record component.
      Returns:
      the value of the wsTimeoutMillis record component
    • httpConnectTimeoutMillis

      public Integer httpConnectTimeoutMillis()
      Returns the value of the httpConnectTimeoutMillis record component.
      Returns:
      the value of the httpConnectTimeoutMillis record component
    • httpReadTimeoutMillis

      public Integer httpReadTimeoutMillis()
      Returns the value of the httpReadTimeoutMillis record component.
      Returns:
      the value of the httpReadTimeoutMillis record component
    • sendThreads

      public Integer sendThreads()
      Returns the value of the sendThreads record component.
      Returns:
      the value of the sendThreads record component
    • receiveThreads

      public Integer receiveThreads()
      Returns the value of the receiveThreads record component.
      Returns:
      the value of the receiveThreads record component