Class ObservingEndpoint
java.lang.Object
org.eclipse.californium.core.observe.ObservingEndpoint
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 Summary
ConstructorDescriptionObservingEndpoint
(InetSocketAddress address) Constructs a new ObservingEndpoint. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addObserveRelation
(ObserveRelation relation) Adds the specified observe relation.void
Cancels all observe relations that this endpoint has established with resources from this server.Returns the address of this endpoint-getObserveRelation
(Token token) Deprecated.obsoleteboolean
isEmpty()
void
removeObserveRelation
(ObserveRelation relation) Removes the specified observe relations.
-
Constructor Details
-
ObservingEndpoint
Constructs a new ObservingEndpoint.- Parameters:
address
- the endpoint's address- Throws:
NullPointerException
- if address isnull
.
-
-
Method Details
-
addObserveRelation
Adds the specified observe relation.- Parameters:
relation
- the relation
-
removeObserveRelation
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
Returns the address of this endpoint-- Returns:
- the address
-
getObserveRelation
Deprecated.obsoleteGet observer relation for provided token.- Parameters:
token
- observe request's token- Returns:
- observe relation, or
null
, if not available.
-
isEmpty
public boolean isEmpty()
-