Class Node

java.lang.Object
org.drasyl.event.Node

public class Node extends Object
Used by Event to describe an event related to the local Node (e.g. NodeUpEvent, NodeOnlineEvent).

This is an immutable object.

  • Method Details

    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getIdentity

      public Identity getIdentity()
      Returns the node's identity.
      Returns:
      the node's identity
    • getEndpoints

      public Set<Endpoint> getEndpoints()
      Returns the node's endpoints.
      Returns:
      the node's endpoints
    • of

      public static Node of(Identity identity)
    • of

      public static Node of(Identity identity, Set<Endpoint> endpoints)