/** * Provides a mechanism to trigger processing on a container thread. * * @param runnable The task representing the processing that needs to take * place on a container thread */ protected void execute(Runnable runnable) { SocketWrapperBase<?> socketWrapper = this.socketWrapper; if (socketWrapper == null) { throw new RejectedExecutionException(sm.getString("abstractProcessor.noExecute")); } else { socketWrapper.execute(runnable); } }
void processStreamOnContainerThread(StreamProcessor streamProcessor, SocketEvent event) { StreamRunnable streamRunnable = new StreamRunnable(streamProcessor, event); if (streamConcurrency == null) { socketWrapper.execute(streamRunnable); } else { if (getStreamConcurrency() < protocol.getMaxConcurrentStreamExecution()) { increaseStreamConcurrency(); socketWrapper.execute(streamRunnable); } else { queuedRunnable.offer(streamRunnable); } } }
void executeQueuedStream() { if (streamConcurrency == null) { return; } decreaseStreamConcurrency(); if (getStreamConcurrency() < protocol.getMaxConcurrentStreamExecution()) { StreamRunnable streamRunnable = queuedRunnable.poll(); if (streamRunnable != null) { increaseStreamConcurrency(); socketWrapper.execute(streamRunnable); } } }
OnResultRunnable r = new OnResultRunnable(sh, t); try { socketWrapper.execute(r); } catch (RejectedExecutionException ree) {
OnResultRunnable r = new OnResultRunnable(sh, t); try { socketWrapper.execute(r); } catch (RejectedExecutionException ree) {