Unfortunately due to type erasure a Java method lambda reference cannot be used with the API. For Groovy there is a class which can be subclassed that allows passing Groovy method references.