Class ObserveRelationContainer

java.lang.Object
org.eclipse.californium.core.observe.ObserveRelationContainer
All Implemented Interfaces:
Iterable<ObserveRelation>

@Deprecated public class ObserveRelationContainer extends Object implements Iterable<ObserveRelation>
Deprecated.
obsolete
This is a container for ObserveRelations that resources use to hold their observe relations. When a resource changes it will notify all relations in the container. Each observe relation must only exist once. However, an endpoint could establish more than one observe relation to the same resource.
  • Constructor Details

    • ObserveRelationContainer

      public ObserveRelationContainer()
      Deprecated.
      Constructs a container for observe relations.
  • Method Details

    • add

      public boolean add(ObserveRelation relation)
      Deprecated.
      Adds the specified observe relation.
      Parameters:
      relation - the observe relation
      Returns:
      true, if a old relation was replaced by the provided one, false, if the provided relation was added.
    • addAndGetPrevious

      public ObserveRelation addAndGetPrevious(ObserveRelation relation)
      Deprecated.
      Adds the specified observe relation.
      Parameters:
      relation - the observe relation
      Returns:
      canceled previous relation, or null, if not previous relation was available.
      Since:
      2.1
    • remove

      public boolean remove(ObserveRelation relation)
      Deprecated.
      Removes the specified observe relation.
      Parameters:
      relation - the observe relation
      Returns:
      true, if successful
    • getSize

      public int getSize()
      Deprecated.
      Gets the number of observe relations in this container.
      Returns:
      the number of observe relations
    • iterator

      public Iterator<ObserveRelation> iterator()
      Deprecated.
      Specified by:
      iterator in interface Iterable<ObserveRelation>