public static Response.ResponseAttachment get(SelectionKey selectionKey) { final Object attachment = selectionKey.attachment(); if (attachment != null && attachment instanceof ThreadAttachment) { return (ResponseAttachment) ((ThreadAttachment) attachment).getAttribute(SUSPENDED_RESPONSE_ATTR); } return null; }
private static void notifyRemotelyClosed(SelectionKey key) { if (Thread.currentThread() instanceof WorkerThread) { ConnectionCloseHandlerNotifier notifier = (ConnectionCloseHandlerNotifier) ((WorkerThread) Thread.currentThread()).getAttachment().getAttribute("ConnectionCloseHandlerNotifier"); if (notifier != null) { notifier.notifyRemotlyClose(key); } } }
ConnectionCloseHandler cch = (ConnectionCloseHandler) ((WorkerThread)Thread.currentThread()) .getAttachment().getAttribute("ConnectionCloseHandler"); if (cch != null){ cch.remotlyClosed(key);
ConnectionCloseHandler cch = (ConnectionCloseHandler) ((WorkerThread)Thread.currentThread()) .getAttachment().getAttribute("ConnectionCloseHandler"); if (cch != null){ cch.remotlyClosed(key);
ConnectionCloseHandler cch = (ConnectionCloseHandler) ((WorkerThread)Thread.currentThread()) .getAttachment().getAttribute("ConnectionCloseHandler"); if (cch != null){ cch.remotlyClosed(key);
ConnectionCloseHandlerNotifier notifier = (ConnectionCloseHandlerNotifier) ((WorkerThread)Thread.currentThread()) .getAttachment().getAttribute("ConnectionCloseHandlerNotifier"); if (notifier != null){ notifier.notifyRemotlyClose(key);