you could use an enum instead of int. The enum could have a method hanlde() taking the Deferred object as argument.
It will make the code more readable