Record Class ProviderRuntimeConfiguration

java.lang.Object
java.lang.Record
org.cloudburstmc.netty.signaling.provider.ProviderRuntimeConfiguration

public record ProviderRuntimeConfiguration(URI origin, Path stateDirectory, String authorizationToken, String region, String pool, Map<String,String> tags, String label, String bindAddress, int udpPort, List<InetSocketAddress> advertisedEndpoints, int capacity, ProviderClient.ControlTransport controlTransport) extends Record
Validated NXS settings, with the listener and capacity inherited from whatever is hosting.
  • Constructor Details

    • ProviderRuntimeConfiguration

      public ProviderRuntimeConfiguration(URI origin, Path stateDirectory, String authorizationToken, String region, String pool, Map<String,String> tags, String label, String bindAddress, int udpPort, List<InetSocketAddress> advertisedEndpoints, int capacity, ProviderClient.ControlTransport controlTransport)
      Creates an instance of a ProviderRuntimeConfiguration record class.
      Parameters:
      origin - the value for the origin record component
      stateDirectory - the value for the stateDirectory record component
      authorizationToken - the value for the authorizationToken record component
      region - the value for the region record component
      pool - the value for the pool record component
      tags - the value for the tags record component
      label - the value for the label record component
      bindAddress - the value for the bindAddress record component
      udpPort - the value for the udpPort record component
      advertisedEndpoints - the value for the advertisedEndpoints record component
      capacity - the value for the capacity record component
      controlTransport - the value for the controlTransport record component
  • Method Details

    • resolve

      public static ProviderRuntimeConfiguration resolve(ProviderRuntimeConfiguration.Settings settings, Path directory, String bindAddress, int udpPort, int maxPlayers, String label) throws IOException
      Parameters:
      settings - What the host has configured for the provider
      directory - The host's data directory, which the state directory and any token file are resolved against
      bindAddress - The address the host listens on
      udpPort - The fixed UDP port the provider hands out, which cannot be ephemeral
      maxPlayers - The routing capacity to register with
      label - The host's name, as the provider should show it
      Throws:
      IOException
    • profile

      public String profile()
    • clientConfiguration

      public ProviderClient.Configuration clientConfiguration()
    • encodedAdvertisedEndpoints

      public String encodedAdvertisedEndpoints()
    • toString

      public 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • origin

      public URI origin()
      Returns the value of the origin record component.
      Returns:
      the value of the origin record component
    • stateDirectory

      public Path stateDirectory()
      Returns the value of the stateDirectory record component.
      Returns:
      the value of the stateDirectory record component
    • authorizationToken

      public String authorizationToken()
      Returns the value of the authorizationToken record component.
      Returns:
      the value of the authorizationToken record component
    • region

      public String region()
      Returns the value of the region record component.
      Returns:
      the value of the region record component
    • pool

      public String pool()
      Returns the value of the pool record component.
      Returns:
      the value of the pool record component
    • tags

      public Map<String,String> tags()
      Returns the value of the tags record component.
      Returns:
      the value of the tags record component
    • label

      public String label()
      Returns the value of the label record component.
      Returns:
      the value of the label record component
    • bindAddress

      public String bindAddress()
      Returns the value of the bindAddress record component.
      Returns:
      the value of the bindAddress record component
    • udpPort

      public int udpPort()
      Returns the value of the udpPort record component.
      Returns:
      the value of the udpPort record component
    • advertisedEndpoints

      public List<InetSocketAddress> advertisedEndpoints()
      Returns the value of the advertisedEndpoints record component.
      Returns:
      the value of the advertisedEndpoints record component
    • capacity

      public int capacity()
      Returns the value of the capacity record component.
      Returns:
      the value of the capacity record component
    • controlTransport

      public ProviderClient.ControlTransport controlTransport()
      Returns the value of the controlTransport record component.
      Returns:
      the value of the controlTransport record component