code: @SuppressWarnings("unchecked")
    public static <Type extends Message> RpcCallback<Type>
    specializeCallback(final RpcCallback<Message> originalCallback) {
      return (RpcCallback<Type>)originalCallback;
      // The above cast works, but only due to technical details of the Java
      // implementation.  A more theoretically correct -- but less efficient --
      // implementation would be as follows:
      //   return new RpcCallback<Type>() {
      //     public void run(Type parameter) {
      //       originalCallback.run(parameter);
      //     }
      //   };
    }
docs: Take an {@code RpcCallback<Message>} and convert it to an
  {@code RpcCallback} accepting a specific message type.  This is always
  type-safe (parameter type contravariance).