Class ObservingEndpoint

java.lang.Object
org.eclipse.californium.core.observe.ObservingEndpoint

public class ObservingEndpoint extends Object
This class represents an observing endpoint. It holds all observe relations that the endpoint has to this server. If a confirmable notification timeouts for the maximum times allowed the server assumes the client is no longer reachable and cancels all relations that it has established to resources.
  • Constructor Details

    • ObservingEndpoint

      public ObservingEndpoint(InetSocketAddress address)
      Constructs a new ObservingEndpoint.
      Parameters:
      address - the endpoint's address
      Throws:
      NullPointerException - if address is null.
  • Method Details

    • addObserveRelation

      public void addObserveRelation(ObserveRelation relation)
      Adds the specified observe relation.
      Parameters:
      relation - the relation
    • removeObserveRelation

      public void removeObserveRelation(ObserveRelation relation)
      Removes the specified observe relations.
      Parameters:
      relation - the relation
    • cancelAll

      public void cancelAll()
      Cancels all observe relations that this endpoint has established with resources from this server.
    • getAddress

      public InetSocketAddress getAddress()
      Returns the address of this endpoint-
      Returns:
      the address
    • getObserveRelation

      @Deprecated public ObserveRelation getObserveRelation(Token token)
      Deprecated.
      obsolete
      Get observer relation for provided token.
      Parameters:
      token - observe request's token
      Returns:
      observe relation, or null, if not available.
    • isEmpty

      public boolean isEmpty()