As a developer often I'd like the ability to access and use the underlying RemoteChannel that is initiating the execution of a RemoteCallable or RemoteRunnable, say to asynchronously send back other callables/runnables or emit events.
Instead of changing the RemoteCallable / RemoteRunnable interfaces or introducing new RemoteChannel aware interfaces, we should simply allow implementations to annotate fields and methods requiring a RemoteChannel to be injected using the @RemoteChannel.Inject annotation, prior to execution.
For example: Permit the following
@RemoteChannel.Inject
public/private RemoteChannel channel; // this should be injected prior to execution
As a developer often I'd like the ability to access and use the underlying RemoteChannel that is initiating the execution of a RemoteCallable or RemoteRunnable, say to asynchronously send back other callables/runnables or emit events.
Instead of changing the RemoteCallable / RemoteRunnable interfaces or introducing new RemoteChannel aware interfaces, we should simply allow implementations to annotate fields and methods requiring a RemoteChannel to be injected using the @RemoteChannel.Inject annotation, prior to execution.
For example: Permit the following
and