new SocketWrapper<Long>(Long.valueOf(socket)); SocketEventProcessor proc = new SocketEventProcessor(wrapper, status); ClassLoader loader = Thread.currentThread().getContextClassLoader(); try {
/** * Process given socket for an event. */ protected boolean processSocket(long socket, SocketStatus status) { try { if (executor == null) { getWorkerThread().assign(socket, status); } else { executor.execute(new SocketEventProcessor(socket, status)); } } 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 for an event. */ public boolean processSocket(long socket, SocketStatus status) { try { Executor executor = getExecutor(); if (executor == null) { log.warn(sm.getString("endpoint.warn.noExector", Long.valueOf(socket), status)); } else { SocketWrapper<Long> wrapper = new SocketWrapper<Long>(Long.valueOf(socket)); executor.execute(new SocketEventProcessor(wrapper, status)); } } 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 for an event. */ protected boolean processSocket(long socket, SocketStatus status) { try { if (executor == null) { Worker worker = getWorkerThread(); if (worker != null) { worker.assign(socket, status); } else { return false; } } else { executor.execute(new SocketEventProcessor(socket, status)); } } 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 for an event. */ protected boolean processSocket(long socket, SocketStatus status) { try { SocketWrapper<Long> wrapper = new SocketWrapper<Long>(Long.valueOf(socket)); getExecutor().execute(new SocketEventProcessor(wrapper, status)); } 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 for an event. */ protected boolean processSocket(long socket, SocketStatus status) { try { if (executor == null) { getWorkerThread().assign(socket, status); } else { executor.execute(new SocketEventProcessor(socket, status)); } } 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; }