Patch Set 6:

Robin: regarding your proposal

> I think the state-without-a-name is a problem here. What
> does it mean? It it cannot be name it is not defined and
> I don't think we want that. How about having more flags.
> checkState could check all flags.

You're now the second one who doesn't like this. Ok, I'll give it a specific name e.g. "callable". Maybe we'll have even more flags later, but up to know I only need "callable".

> Make the call to call() an internal one and wrap iit so
> commands gets executed through that wrapper. The wrapper 
> then keeps track of the state to each command doesm't 
> have to deall with the unnamed state.

This was my first idea, but it didn't worked out when trying to implement it. Problem is that every Command implements call() but throws a different set of exceptions. Although we have a common interface the implementations differ in the set of exceptions they throw.

If I would do like you suggested I would force user to call the wrappers call() method which will always only "throws Exception".