saker.build Documentation TaskDoc JavaDoc Packages
public interface FileEventListener.ListenerToken extends Token
Token interface for installed file event listeners.

Clients receiving this token should keep them strongly referenced until the listener is no longer needed. Calling removeListener() will uninstall it from the file provider.

See Token documentation for more information about tokens.

Methods
public void
Removes the associated listener to this token.
public abstract void removeListener()
Removes the associated listener to this token.

The file listeners might still receive some events after this call (or during this call, on the same thread), as the events can occur out of order. Listeners should handle that scenario gracefully.

Calling this function subsequently has no further effect, meaning that once the listener is removed, attemting to remove it again is a no-op.