public void updateTask(TaskStateType.TaskState t, TaskStateType.TaskState.State state, V result) {
   LOG.log(
       Level.INFO,
       "Update task with state ''{0}'' and payload ''{1}''",
       new Object[] {state, result});
   ByteString payload = outSerial.serialize(result);
   ByteString schema = outSerial.getSchema();
   TaskStateType.TaskState update =
       TaskStateType.TaskState.newBuilder()
           .setOrigin(HANDLER)
           .setState(state)
           .setSerial(t.getSerial() + 1)
           .setWireSchema(schema)
           .setPayload(payload)
           .build();
   send(update);
 }
 public T deserialize(ByteString b) {
   return inSerial.deserialize(b);
 }