Skip to content

Commit

Permalink
#751: Add some documentation about listener execution.
Browse files Browse the repository at this point in the history
  • Loading branch information
sbernard31 committed Oct 17, 2019
1 parent 07b9deb commit 742669f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
Expand Up @@ -19,10 +19,27 @@
import org.eclipse.leshan.core.response.ObserveResponse;
import org.eclipse.leshan.server.registration.Registration;

/**
* Monitor observation lifetime.
* <p>
* Those methods are called by the protocol stage thread pool, this means that execution MUST be done in a short delay,
* if you need to do long time processing use a dedicated thread pool.
*/
public interface ObservationListener {

/**
* Called when a new observation is created.
*
* @param observation the new observation.
* @param registration the related registration
*/
void newObservation(Observation observation, Registration registration);

/**
* Called when an observation is cancelled.
*
* @param observation the cancelled observation.
*/
void cancelled(Observation observation);

/**
Expand Down
Expand Up @@ -19,7 +19,9 @@

/**
* A listener aware of the status of LWM2M Client using queue mode binding.
*
* <p>
* Those methods are called by the protocol stage thread pool, this means that execution MUST be done in a short delay,
* if you need to do long time processing use a dedicated thread pool.
*/
public interface PresenceListener {

Expand Down
Expand Up @@ -21,6 +21,9 @@

/**
* Listen for client registration events.
* <p>
* Those methods are called by the protocol stage thread pool, this means that execution MUST be done in a short delay,
* if you need to do long time processing use a dedicated thread pool.
*/
public interface RegistrationListener {

Expand Down

0 comments on commit 742669f

Please sign in to comment.