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
ObserveRelation
s 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 Summary
ConstructorDescriptionDeprecated.Constructs a container for observe relations. -
Method Summary
Modifier and TypeMethodDescriptionboolean
add
(ObserveRelation relation) Deprecated.Adds the specified observe relation.addAndGetPrevious
(ObserveRelation relation) Deprecated.Adds the specified observe relation.int
getSize()
Deprecated.Gets the number of observe relations in this container.iterator()
Deprecated.boolean
remove
(ObserveRelation relation) Deprecated.Removes the specified observe relation.
-
Constructor Details
-
ObserveRelationContainer
public ObserveRelationContainer()Deprecated.Constructs a container for observe relations.
-
-
Method Details
-
add
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
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
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
Deprecated.- Specified by:
iterator
in interfaceIterable<ObserveRelation>
-