(Quick Reference)

removeListeners(String listenerIdPattern)

Available in Controllers, Domains and Services

Count listeners using the pattern argument. The pattern should at least contains the topic information. It returns an int number of removed listeners.

Usage

//display the number of listeners in TestService
println countListeners("*:my.TestService")

Arguments

NameDescription
listenerIdPatternA pattern to match against when finding listeners in registry.

Registered listeners generate a unique id (ListenerId) applying the following pattern :
[namespace://]topic[:package.Class][#method][@hashcode]