docs: public void invokeEndpointMethod(final Executor executor, final Runnable invocation) {
          if (dispatchToWorker) {
              executor.execute(new Runnable() {
                  @Override
                  public void run() {
                      invokeEndpointMethod(invocation);
                  }
              });
          } else {
              invokeEndpointMethod(invocation);
          }
      }