I was thinking about the same. In addition to the change you mention, we'd have to change the declaration of CommandService.execute() to something like:
public <T> T execute(Command<T> command)
Come to think of it, maybe only Command.execute() should be generic. I'm not quite sure the type parameter belongs to the entire class. It'd be interesting to evaluate both alternatives and see which one yields a cleaner interface.
Great idea !
Good, with this update i'm ok on changing the current XPDL extension APIs to use commands.
So, we will take a look on changing our proxy-interceptors approach by commands. This will allow us to still exposing APIs to end users (based on commands) + use commands directly as extension points.
Awsome. Let me know if you need my help in making the command generics refactoring.
I submitted the refactoring of Command interface to use generics.
I updated the Job and Message classes to use generics too (these classes implement Command).