async clients for all generated sync client
- ability to 'fire-and-forget' -> asynchronous method calls without waiting for results (optional with callback handlers).
- call and return after - return with/out exception after max amount of time.
- above options configurable per call/service. @MaxCallDuration
- Multi-Request -> call multiple requests and get notified when all are ready.
- Configurable default max call duration value for all calls.
- Create a org.distributeme.generator.AsynchInterfaceGenerator which generates AsynchFooService extends FooService interface and has an additional method (..., CallHandler ... handlers) for each method.
- Create org.distributeme.generator.AsynchStubGenerator which generates AsynchFooStub
The synch stub should offer all the same methods as the original interface, but execute them via special synch methods. Example:
The corresponding asynch interface should look like:
The Stub should contain an Executor pool with a configurable number of threads. The configuration should happen at class leven (DistributeMe annotation) as well as globally in Defaults.getAsynchExecutorPoolSize().
The 'normal' implementation of the sleep method should call the asynch version and wait for results for the timeout duration. The timeout can be configured globally (Defaults.getDefaultAsynchCallTimeout()), on class level (DistributeMe annotation) or with method level annotation (@MaxAsynchCallWait or something).
The special asynchronous method should behave a little bit differently:
After successful or unsuccessful execution of original method, all CallHandlers should be called with either onSuccess or onError.
Call handler is an interface. There are built in call handlers, but they can also be provided by the client.
MultiCall handlers are built in call handlers which allow the client to fire multiple requests (from multiple services) and wait for execution of all of them. Example: