* <tt>RuntimeException</tt> will be thrown if the polling is active already. Concurrent polling is not allowed.
* @param outstream - output stream to write the polling results to.
*/
public void poll(final boolean wait, final OutputStream outstream) throws IOException {
if (!queueRunning) {
JSONStreamEncoder.encode(new QueueStopMessage().getParts(), outstream);
return;
}
Message m = null;