celery-java icon indicating copy to clipboard operation
celery-java copied to clipboard

Ability to annotate interface

Open crabhi opened this issue 9 years ago • 0 comments

It should be possible to annotate an interface without implementation to generate the proxy for Python code.

Like this:

public interface PostcodeTask {
    @Task(name="postcode.inflect_city")
    String inflectCity(String postCode, int wordCase);
}

You would then call a proxy class as usual:

Future<String> result = PostcodeTaskProxy.with(client).inflectCity("10100", 1);
// computation performed by Python function inflect_city in postcode.py
assertEquals("Praha", result.get());

crabhi avatar Oct 18 '17 14:10 crabhi