code: public static StreamSource of(final QueueFactory<?> q) {
          Objects.requireNonNull(q);
          return new StreamSource() {
              @SuppressWarnings("unchecked")
              @Override
              <T> Queue<T> createQueue() {
                  return (Queue<T>) q.build();
  
              }
          };
      }
docs: Construct a Pushable StreamSource using the provided QueueFactory as a push mechanism
  @see QueueFactories for Factory creation options and various backpressure strategies
  
  <pre>
  {@code
  PushableStream<Integer> pushable = StreamSource.of(QueueFactories.boundedQueue(10))
  .stream();
  pushable.getInput()
  .offer(10);
  
  Stream<Integer> stream = pushable.getStream();
  stream.forEach(System.out::println);
  
  print 10
  
  pushable.getInput()
  .offer(20);
  
  print 20
  
  
  pushable.getInput()
  .close();
  }
  </pre>
  
  
  
  @param q QueueFactory used to create the Adapter to back the pushable StreamSource
  @return Pushable StreamSource