Package eu.ill.webx.model
Record Class ConnectionData
java.lang.Object
java.lang.Record
eu.ill.webx.model.ConnectionData
- Record Components:
publisherPort- the publisher portsubscriberPort- the subscriber portsessionPort- the session port (WebX Router only)serverPublicKey- the session public key of the router (WebX Router only)
public record ConnectionData(int publisherPort, int subscriberPort, int sessionPort, String serverPublicKey)
extends Record
Encapsulates connection data returned by the client connector and used to connect all the sockets.
-
Constructor Summary
ConstructorsConstructorDescriptionConnectionData(int publisherPort, int subscriberPort) Returned from a standalone WebX Engine with the ports of the publisher and subscriber socketsConnectionData(int publisherPort, int subscriberPort, int sessionPort, String serverPublicKey) Creates an instance of aConnectionDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thepublisherPortrecord component.Returns the value of theserverPublicKeyrecord component.intReturns the value of thesessionPortrecord component.intReturns the value of thesubscriberPortrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ConnectionData
public ConnectionData(int publisherPort, int subscriberPort) Returned from a standalone WebX Engine with the ports of the publisher and subscriber sockets- Parameters:
publisherPort- the publisher portsubscriberPort- the subscriber port
-
ConnectionData
public ConnectionData(int publisherPort, int subscriberPort, int sessionPort, String serverPublicKey) Creates an instance of aConnectionDatarecord class.- Parameters:
publisherPort- the value for thepublisherPortrecord componentsubscriberPort- the value for thesubscriberPortrecord componentsessionPort- the value for thesessionPortrecord componentserverPublicKey- the value for theserverPublicKeyrecord 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 '=='. -
publisherPort
public int publisherPort()Returns the value of thepublisherPortrecord component.- Returns:
- the value of the
publisherPortrecord component
-
subscriberPort
public int subscriberPort()Returns the value of thesubscriberPortrecord component.- Returns:
- the value of the
subscriberPortrecord component
-
sessionPort
public int sessionPort()Returns the value of thesessionPortrecord component.- Returns:
- the value of the
sessionPortrecord component
-
serverPublicKey
Returns the value of theserverPublicKeyrecord component.- Returns:
- the value of the
serverPublicKeyrecord component
-