title: How to know when Observable or Subject has been subscribed to
body: <p>I want to detect when my Observable or Subject has been subscribed to. </p>
  
  <p>I think there should be something like the following method in one of them:</p>
  
  <pre><code>public void onSubscribe(Consumer&lt;T&gt; listener);
  </code></pre>
  
  <p>Or even:</p>
  
  <pre><code>public void onSubscribe(Observer observer);
  </code></pre>
  
  <p>In the latter one, the observer which observers for another observers is being added, interesting. I think that would be usefull, I need it.</p>
  
  <p>Maybe my class needs to maintain a list of subscribers from its observable, how could I achieve that? I think there isn't something like:</p>
  
  <pre><code>public Collection&lt;Observer&gt; getObservers();
  </code></pre>
  
  <p>Is there such method to get the observers? Even if there is, I would still like to be able to get notified when my Observable or Subject gets subscribed!</p>
  
  <p>There actually is <code>onSubscribe</code> method but I think that one has completelly different use case, it takes <code>Disposable</code> as paramater. Can you also me tell what that one is for?
  <br><br></p>
  
  <h2>My use case</h2>
  
  <p>My class needs to maintain a collection of those subscribers, I don't know is there a direct way of getting that collection from Observable of Subject, but even if there is, I still think it would be good to have <code>void onSubscribe(Consumer&lt;T&gt; c)</code> method simply because it provides more controll.</p>