Interface Resource.StateListener
- Enclosing interface:
Resource
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Application listener for a
Resource.
Listeners are usually registered at creation time.
Dispatching Guarantees:
- Sequential: Listeners are invoked sequentially for a given resource. The library
guarantees that state transitions are observed in the exact chronological order they
occurred (e.g., a
CLOSINGevent will never be dispatched before its precedingOPENevent).
Implementation Note: Implementations should avoid long-running or blocking operations. Blocking a listener will stall subsequent state notifications for that specific resource.
- See Also:
-
Method Summary
-
Method Details
-
handle
Handle state change.- Parameters:
context- state change context
-