Record Class Destination
java.lang.Object
java.lang.Record
com.iantapply.relay.api.Destination
- Record Components:
kind- destination categorynodeId- target node identifier forDestination.Kind.NODE, otherwisenull
Selects the Relay nodes that should receive a message.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionDestination(Destination.Kind kind, String nodeId) Validates a destination's category and optional node identifier. -
Method Summary
Modifier and TypeMethodDescriptionstatic DestinationCreates a destination containing every Relay node.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.kind()Returns the value of thekindrecord component.static DestinationCreates a destination for one Relay node.nodeId()Returns the value of thenodeIdrecord component.static DestinationCreates a destination containing every Paper server.final StringtoString()Returns a string representation of this record class.static DestinationCreates a destination containing every Velocity proxy.wireName()Returns the stable representation used in Relay envelopes.
-
Constructor Details
-
Destination
Validates a destination's category and optional node identifier.- Parameters:
kind- destination categorynodeId- target node identifier for node destinations
-
-
Method Details
-
broadcast
Creates a destination containing every Relay node.- Returns:
- broadcast destination
-
paperServers
Creates a destination containing every Paper server.- Returns:
- Paper destination
-
velocityProxies
Creates a destination containing every Velocity proxy.- Returns:
- Velocity destination
-
node
Creates a destination for one Relay node.- Parameters:
id- node identifier- Returns:
- node destination
- Throws:
IllegalArgumentException- if the identifier is invalid
-
wireName
Returns the stable representation used in Relay envelopes.- Returns:
- wire destination name
-
toString
-
hashCode
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
kind
-
nodeId
-