/** * Notifies all CoAP clients that have established an observe relation with * this resource that the state has changed by reprocessing their original * request that has established the relation. * * @param filter filter to select set of relations. * <code>null</code>, if all clients should be notified. */ protected void notifyObserverRelations(final ObserveRelationFilter filter) { notificationOrderer.getNextObserveNumber(); for (ObserveRelation relation:observeRelations) { if (null == filter || filter.accept(relation)) relation.notifyObservers(); } }
/** * Notifies all CoAP clients that have established an observe relation with * this resource that the state has changed by reprocessing their original * request that has established the relation. * * @param filter filter to select set of relations. * <code>null</code>, if all clients should be notified. */ protected void notifyObserverRelations(final ObserveRelationFilter filter) { notificationOrderer.getNextObserveNumber(); for (ObserveRelation relation:observeRelations) { if (null == filter || filter.accept(relation)) relation.notifyObservers(); } }