Record Class PontonXPAdapterConfiguration
java.lang.Object
java.lang.Record
energy.eddie.regionconnector.at.eda.ponton.PontonXPAdapterConfiguration
- Record Components:
adapterId- ID of the adapter that will be used by the Ponton XP Messenger. The value used for this should be configured as the default adapter in the messengeradapterVersion- Version of the adapter.hostname- Address of the Ponton XP Messengerport- Port of the Ponton XP Messenger adapter interface (default: 2600)apiEndpoint- API endpoint of the Ponton XP MessengerworkFolder- Path to the folder where the Ponton XP Adapter will store its files like id.dat which is used by the messenger to identify the adapter.username- Username for the Ponton XP Messenger to use REST API endpoints that require authentication. Needs to be a user without 2FA activated.password- Password for the given username.inboundConnections- Expected amount of inbound WebSocket connections to the Ponton XP Messenger.outboundConnections- Expected amount of outbound WebSocket connections to the Ponton XP Messenger.connectionWatchdogInterval- How often the Ponton XP Messenger adapter WebSocket connection is checked.connectionStatusTimeout- Maximum time after start or reconnect until a connection-status callback must be received.
@Validated
@ConfigurationProperties("region-connector.at.eda.ponton.messenger")
public record PontonXPAdapterConfiguration(String adapterId, String adapterVersion, String hostname, int port, String apiEndpoint, String workFolder, String username, String password, @jakarta.validation.constraints.Positive int inboundConnections, @jakarta.validation.constraints.Positive int outboundConnections, @DurationMin(nanos=1L) Duration connectionWatchdogInterval, @DurationMin(nanos=1L) Duration connectionStatusTimeout)
extends Record
This record defines all information needed for a PontonXPAdapter to establish a connection to a Ponton XP Messenger.
-
Constructor Summary
ConstructorsConstructorDescriptionPontonXPAdapterConfiguration(String adapterId, String adapterVersion, String hostname, int port, String apiEndpoint, String workFolder, String username, String password, @jakarta.validation.constraints.Positive int inboundConnections, @jakarta.validation.constraints.Positive int outboundConnections, @DurationMin(nanos=1L) Duration connectionWatchdogInterval, @DurationMin(nanos=1L) Duration connectionStatusTimeout) Creates an instance of aPontonXPAdapterConfigurationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theadapterIdrecord component.Returns the value of theadapterVersionrecord component.Returns the value of theapiEndpointrecord component.@DurationMin(nanos=1L) DurationReturns the value of theconnectionStatusTimeoutrecord component.@DurationMin(nanos=1L) DurationReturns the value of theconnectionWatchdogIntervalrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.hostname()Returns the value of thehostnamerecord component.@jakarta.validation.constraints.Positive intReturns the value of theinboundConnectionsrecord component.@jakarta.validation.constraints.Positive intReturns the value of theoutboundConnectionsrecord component.password()Returns the value of thepasswordrecord component.intport()Returns the value of theportrecord component.final StringtoString()Returns a string representation of this record class.username()Returns the value of theusernamerecord component.Returns the value of theworkFolderrecord component.
-
Constructor Details
-
PontonXPAdapterConfiguration
public PontonXPAdapterConfiguration(@Name("adapter.id") String adapterId, @Name("adapter.version") String adapterVersion, @Name("hostname") String hostname, @Name("port") int port, @Name("api.endpoint") String apiEndpoint, @Name("folder") String workFolder, @Name("username") String username, @Name("password") String password, @Name("inbound-connections") @Positive @DefaultValue("1") @jakarta.validation.constraints.Positive int inboundConnections, @Name("outbound-connections") @Positive @DefaultValue("1") @jakarta.validation.constraints.Positive int outboundConnections, @Name("connection-watchdog.interval") @DurationMin(nanos=1L) @DefaultValue("1m") @DurationMin(nanos=1L) Duration connectionWatchdogInterval, @Name("connection-watchdog.status-timeout") @DurationMin(nanos=1L) @DefaultValue("2m") @DurationMin(nanos=1L) Duration connectionStatusTimeout) Creates an instance of aPontonXPAdapterConfigurationrecord class.- Parameters:
adapterId- the value for theadapterIdrecord componentadapterVersion- the value for theadapterVersionrecord componenthostname- the value for thehostnamerecord componentport- the value for theportrecord componentapiEndpoint- the value for theapiEndpointrecord componentworkFolder- the value for theworkFolderrecord componentusername- the value for theusernamerecord componentpassword- the value for thepasswordrecord componentinboundConnections- the value for theinboundConnectionsrecord componentoutboundConnections- the value for theoutboundConnectionsrecord componentconnectionWatchdogInterval- the value for theconnectionWatchdogIntervalrecord componentconnectionStatusTimeout- the value for theconnectionStatusTimeoutrecord component
-
-
Method Details
-
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 '=='. -
adapterId
Returns the value of theadapterIdrecord component.- Returns:
- the value of the
adapterIdrecord component
-
adapterVersion
Returns the value of theadapterVersionrecord component.- Returns:
- the value of the
adapterVersionrecord component
-
hostname
Returns the value of thehostnamerecord component.- Returns:
- the value of the
hostnamerecord component
-
port
public int port()Returns the value of theportrecord component.- Returns:
- the value of the
portrecord component
-
apiEndpoint
Returns the value of theapiEndpointrecord component.- Returns:
- the value of the
apiEndpointrecord component
-
workFolder
Returns the value of theworkFolderrecord component.- Returns:
- the value of the
workFolderrecord component
-
username
Returns the value of theusernamerecord component.- Returns:
- the value of the
usernamerecord component
-
password
Returns the value of thepasswordrecord component.- Returns:
- the value of the
passwordrecord component
-
inboundConnections
@Positive public @jakarta.validation.constraints.Positive int inboundConnections()Returns the value of theinboundConnectionsrecord component.- Returns:
- the value of the
inboundConnectionsrecord component
-
outboundConnections
@Positive public @jakarta.validation.constraints.Positive int outboundConnections()Returns the value of theoutboundConnectionsrecord component.- Returns:
- the value of the
outboundConnectionsrecord component
-
connectionWatchdogInterval
Returns the value of theconnectionWatchdogIntervalrecord component.- Returns:
- the value of the
connectionWatchdogIntervalrecord component
-
connectionStatusTimeout
Returns the value of theconnectionStatusTimeoutrecord component.- Returns:
- the value of the
connectionStatusTimeoutrecord component
-