code: public SampleMessage getNextSample() {
  		if (this.connected) {
  			try {
  				return this.sampleQueue.take();
  			} catch (InterruptedException e) {
  				log.error(
  						"Interrupted while waiting for next sample to arrive.",
  						e);
  			}
  			return null;
  		}
  		throw new IllegalStateException(
  				"Connection to the aggregator has terminated.");
  
  	}
docs: Returns the next sample from the Aggregator, blocking until it is
  available if none are currently buffered. If the connection to the
  aggregator has been completely shut down, then this method will throw an
  IllegalStateException.
  
  @return the next sample received from the Aggregator.
  @throws IllegalStateException
  if this method is called after the Aggregator has been
  disconnected.