Wouldn't it be simpler if handleWriteCommand would only deal with DataWriteCommands?