Record Class ConnectionData

java.lang.Object
java.lang.Record
eu.ill.webx.model.ConnectionData
Record Components:
publisherPort - the publisher port
subscriberPort - the subscriber port
sessionPort - 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 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 port
      subscriberPort - the subscriber port
    • ConnectionData

      public ConnectionData(int publisherPort, int subscriberPort, int sessionPort, String serverPublicKey)
      Creates an instance of a ConnectionData record class.
      Parameters:
      publisherPort - the value for the publisherPort record component
      subscriberPort - the value for the subscriberPort record component
      sessionPort - the value for the sessionPort record component
      serverPublicKey - the value for the serverPublicKey record component
  • Method Details

    • 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. 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.
    • publisherPort

      public int publisherPort()
      Returns the value of the publisherPort record component.
      Returns:
      the value of the publisherPort record component
    • subscriberPort

      public int subscriberPort()
      Returns the value of the subscriberPort record component.
      Returns:
      the value of the subscriberPort record component
    • sessionPort

      public int sessionPort()
      Returns the value of the sessionPort record component.
      Returns:
      the value of the sessionPort record component
    • serverPublicKey

      public String serverPublicKey()
      Returns the value of the serverPublicKey record component.
      Returns:
      the value of the serverPublicKey record component