title: Is there an equivalent of Project Reactor's Flux.create() that caters for push/pull model in rxjava-2?
body: <p>Project Reactor has this factory method for creating a push/pull <code>Producer&lt;T&gt;</code>.</p>
  
  <p><a href="http://projectreactor.io/docs/core/release/reference/#_hybrid_push_pull_model" rel="nofollow noreferrer">http://projectreactor.io/docs/core/release/reference/#_hybrid_push_pull_model</a></p>
  
  <p>Is there any such thing in RxJava-2?</p>
  
  <p>If not, what would be the recommended way (without actually implemementing reactive specs interfaces from scratch) to create such beast that can handle the push/pull model?</p>
  
  <p><strong>EDIT</strong>: as requested I am giving an example of the API I am trying to use...</p>
  
  <pre><code>private static class API
  {
      CompletableFuture&lt;Void&gt; getT(Consumer&lt;Object&gt; consumer) {}
  }
  
  private static class Callback implements Consumer&lt;Object&gt;
  {
  
      private API api;
  
      public Callback(API api) { this api = api; }
  
      @Override
      public void accept(Object o)
      {
          //do stuff with o
          //...
          //request for another o
          api.getT(this);
      }
  }
  
  public void example()
  {
  
      API api = new API();
      api.getT(new Callback(api)).join();
  
  }
  </code></pre>
  
  <p>So it's call back based, which will get one item and from within you can request for another one. the completable future flags no more items.</p>