code: public <T> Observable<T> asObservable(final Class<T> eventType) {
          return Observable.create(new OnSubscribe<T>() {
              @Override
              public void call(final Subscriber<? super T> observer) {
                  final DynamicSubscriber consumer = new DynamicSubscriber() {
                      @Override
                      public Class<?> getEventType() {
                          return eventType;
                      }
                      
                      @Subscribe
                      public void consume(Object obj) {
                          observer.onNext((T) obj);
                      }
                  };
                  
                  observer.add(BooleanSubscription.create(new Action0() {
                      @Override
                      public void call() {
                          eventBus.unregisterSubscriber(consumer);
                          observer.onCompleted();
                      }
                  }));
                  
                  try {
                      eventBus.registerSubscriber(consumer);
                  } catch (InvalidSubscriberException e) {
                      observer.onError(e);
                  }
              }
          });
      }
docs: Create an observable for this eventType.  A new event bus subscription
  is made for each call to the Observables.subscribe().  The subscription
  is removed from the underlying EventBus when unsubscribe is called.
  
  @param eventType
  @return