private void addProcessing(Processing processing) { if ( ! isAcceptingNewProcessings()) throw new IllegalStateException("Docproc service " + getName() + " is not accepting new incoming processings. Cannot add " + processing + " "); if ( ! queue.offer(processing)) throw new RejectedExecutionException("Docproc service " + getName() + " is busy, please try later"); }