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, boolean diagnosticAdmission, boolean maintainedCandidates, boolean assistedJoins)
extends Record
Validated NXS settings, with the listener and capacity inherited from whatever is hosting.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordWhat a host's configuration has to supply, so this does not depend on how it stores it. -
Constructor Summary
ConstructorsConstructorDescriptionProviderRuntimeConfiguration(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, boolean diagnosticAdmission, boolean maintainedCandidates, boolean assistedJoins) Creates an instance of aProviderRuntimeConfigurationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theadvertisedEndpointsrecord component.booleanReturns the value of theassistedJoinsrecord component.Returns the value of theauthorizationTokenrecord component.Returns the value of thebindAddressrecord component.intcapacity()Returns the value of thecapacityrecord component.Returns the value of thecontrolTransportrecord component.booleanReturns the value of thediagnosticAdmissionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.label()Returns the value of thelabelrecord component.booleanReturns the value of themaintainedCandidatesrecord component.Ordinary native factory options, with explicit endpoints suppressing discovery/STUN.origin()Returns the value of theoriginrecord component.pool()Returns the value of thepoolrecord component.profile()region()Returns the value of theregionrecord component.static ProviderRuntimeConfigurationresolve(ProviderRuntimeConfiguration.Settings settings, Path directory, String bindAddress, int udpPort, int maxPlayers, String label) Returns the value of thestateDirectoryrecord component.tags()Returns the value of thetagsrecord component.toString()Returns a string representation of this record class.intudpPort()Returns the value of theudpPortrecord component.
-
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, boolean diagnosticAdmission, boolean maintainedCandidates, boolean assistedJoins) Creates an instance of aProviderRuntimeConfigurationrecord class.- Parameters:
origin- the value for theoriginrecord componentstateDirectory- the value for thestateDirectoryrecord componentauthorizationToken- the value for theauthorizationTokenrecord componentregion- the value for theregionrecord componentpool- the value for thepoolrecord componenttags- the value for thetagsrecord componentlabel- the value for thelabelrecord componentbindAddress- the value for thebindAddressrecord componentudpPort- the value for theudpPortrecord componentadvertisedEndpoints- the value for theadvertisedEndpointsrecord componentcapacity- the value for thecapacityrecord componentcontrolTransport- the value for thecontrolTransportrecord componentdiagnosticAdmission- the value for thediagnosticAdmissionrecord componentmaintainedCandidates- the value for themaintainedCandidatesrecord componentassistedJoins- the value for theassistedJoinsrecord 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 providerdirectory- The host's data directory, which the state directory and any token file are resolved againstbindAddress- The address the host listens onudpPort- The fixed UDP port the provider hands out, which cannot be ephemeralmaxPlayers- The routing capacity to register withlabel- The host's name, as the provider should show it- Throws:
IOException
-
profile
-
clientConfiguration
-
encodedAdvertisedEndpoints
-
nativeHostOptions
Ordinary native factory options, with explicit endpoints suppressing discovery/STUN. -
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
origin
Returns the value of theoriginrecord component.- Returns:
- the value of the
originrecord component
-
stateDirectory
Returns the value of thestateDirectoryrecord component.- Returns:
- the value of the
stateDirectoryrecord component
-
authorizationToken
Returns the value of theauthorizationTokenrecord component.- Returns:
- the value of the
authorizationTokenrecord component
-
region
Returns the value of theregionrecord component.- Returns:
- the value of the
regionrecord component
-
pool
Returns the value of thepoolrecord component.- Returns:
- the value of the
poolrecord component
-
tags
Returns the value of thetagsrecord component.- Returns:
- the value of the
tagsrecord component
-
label
Returns the value of thelabelrecord component.- Returns:
- the value of the
labelrecord component
-
bindAddress
Returns the value of thebindAddressrecord component.- Returns:
- the value of the
bindAddressrecord component
-
udpPort
public int udpPort()Returns the value of theudpPortrecord component.- Returns:
- the value of the
udpPortrecord component
-
advertisedEndpoints
Returns the value of theadvertisedEndpointsrecord component.- Returns:
- the value of the
advertisedEndpointsrecord component
-
capacity
public int capacity()Returns the value of thecapacityrecord component.- Returns:
- the value of the
capacityrecord component
-
controlTransport
Returns the value of thecontrolTransportrecord component.- Returns:
- the value of the
controlTransportrecord component
-
diagnosticAdmission
public boolean diagnosticAdmission()Returns the value of thediagnosticAdmissionrecord component.- Returns:
- the value of the
diagnosticAdmissionrecord component
-
maintainedCandidates
public boolean maintainedCandidates()Returns the value of themaintainedCandidatesrecord component.- Returns:
- the value of the
maintainedCandidatesrecord component
-
assistedJoins
public boolean assistedJoins()Returns the value of theassistedJoinsrecord component.- Returns:
- the value of the
assistedJoinsrecord component
-