wrapper.setSecure(isSSLEnabled()); connections.put(Long.valueOf(socket), wrapper); getExecutor().execute(new SocketWithOptionsProcessor(wrapper));
wrapper.setWriteTimeout(getConnectionTimeout()); connections.put(socket, wrapper); getExecutor().execute(new SocketWithOptionsProcessor(wrapper));
/** * Process given socket. */ protected boolean processSocketWithOptions(long socket) { try { // During shutdown, executor may be null - avoid NPE if (running) { SocketWrapper<Long> wrapper = new SocketWrapper<Long>(Long.valueOf(socket)); getExecutor().execute(new SocketWithOptionsProcessor(wrapper)); } } catch (RejectedExecutionException x) { log.warn("Socket processing request was rejected for:"+socket,x); return false; } catch (Throwable t) { ExceptionUtils.handleThrowable(t); // This means we got an OOM or similar creating a thread, or that // the pool and its queue are full log.error(sm.getString("endpoint.process.fail"), t); return false; } return true; }
/** * Process given socket. */ protected boolean processSocketWithOptions(long socket) { try { // During shutdown, executor may be null - avoid NPE if (running) { SocketWrapper<Long> wrapper = new SocketWrapper<Long>(Long.valueOf(socket)); getExecutor().execute(new SocketWithOptionsProcessor(wrapper)); } } catch (RejectedExecutionException x) { log.warn("Socket processing request was rejected for:"+socket,x); return false; } catch (Throwable t) { ExceptionUtils.handleThrowable(t); // This means we got an OOM or similar creating a thread, or that // the pool and its queue are full log.error(sm.getString("endpoint.process.fail"), t); return false; } return true; }
/** * Process given socket. */ protected boolean processSocketWithOptions(long socket) { try { if (executor == null) { Worker worker = getWorkerThread(); if (worker != null) { worker.assignWithOptions(socket); } else { return false; } } else { executor.execute(new SocketWithOptionsProcessor(socket)); } } catch (Throwable t) { // This means we got an OOM or similar creating a thread, or that // the pool and its queue are full CoyoteLogger.NET_LOGGER.errorProcessingSocket(t); return false; } return true; }
/** * Process given socket. */ protected boolean processSocketWithOptions(long socket) { try { // During shutdown, executor may be null - avoid NPE if (running) { SocketWrapper<Long> wrapper = new SocketWrapper<Long>(Long.valueOf(socket)); getExecutor().execute(new SocketWithOptionsProcessor(wrapper)); } } catch (RejectedExecutionException x) { log.warn("Socket processing request was rejected for:"+socket,x); return false; } catch (Throwable t) { ExceptionUtils.handleThrowable(t); // This means we got an OOM or similar creating a thread, or that // the pool and its queue are full log.error(sm.getString("endpoint.process.fail"), t); return false; } return true; }
/** * Process given socket. */ protected boolean processSocketWithOptions(long socket) { try { if (executor == null) { getWorkerThread().assignWithOptions(socket); } else { executor.execute(new SocketWithOptionsProcessor(socket)); } } catch (Throwable t) { // This means we got an OOM or similar creating a thread, or that // the pool and its queue are full log.error(sm.getString("endpoint.process.fail"), t); return false; } return true; }
/** * Process given socket. */ protected boolean processSocketWithOptions(long socket) { try { if (executor == null) { getWorkerThread().assignWithOptions(socket); } else { executor.execute(new SocketWithOptionsProcessor(socket)); } } catch (Throwable t) { // This means we got an OOM or similar creating a thread, or that // the pool and its queue are full log.error(sm.getString("endpoint.process.fail"), t); return false; } return true; }