We'd need to create a new interface (or I guess it could be a Handler
but I think that'll be confusing) and a syntax for registering them in a
module.xml probably. Then the engine would notify all such parties once
the MEP has been completed. We may need an additional bit on the
MessageReceiver interface to ask whether the MEP has been completed.
I'm not sure we'd even need to go as far as a module.xml syntax. What
about simply...
class OperationContext {
...
public void addCompletionObserver(CompletionObserver obs) {
...
}
}
interface CompletionObserver {
void operationComplete(OperationContext op);
// This could even be operationSucceeded() and operationFailed()
}
This seems like it could be very handy, really easy to add, and it would
let Handlers programatically do what Bill's looking for (I think?).
We've already got OperationContext.setComplete() as the hook for this.
Is there a major reason not to put this in now? Seems a very small
change which would provide clear value.
--Glen