Interface HasNodeId

All Known Implementing Classes:
NodeId, Path, ResourceId, TaskId

public interface HasNodeId
An interface which may report a NodeId.
  • Method Details

    • getNodeId

      NodeId getNodeId() throws InvalidNodeIdException
      Returns a NodeId for this instance, throwing an exception if the NodeId is not valid. This may return null to indicate that the NodeId is neither valid nor invalid, but rather simply not present.
      Returns:
      the NodeId or null.
      Throws:
      InvalidNodeIdException - if this instance is unable to derive a NodeId
    • getOptionalNodeId

      default Optional<NodeId> getOptionalNodeId()
      Return and Optional<NodeId>. If this can't determine the node id, then this must return an empty instance of Optional. Unlinke getNodeId(), this makes no distinction between a missing and an invalid id.
      Returns: