public void operationComplete(IoFuture future){ if(future instanceof CloseFuture){ ((CloseFuture)future).setClosed(); } } });
@Override public Object invoke(Invocation invocation) throws Throwable { session.getCloseFuture().setClosed(); return null; } }
public void close() { logger.info("session will be closed now"); closeFuture.setClosed(); try { // allow some time to flush before closibng if(!minaSession.close(false).await(5000, TimeUnit.MILLISECONDS)) { // no really close if necessary minaSession.close(true); } } catch (InterruptedException e) { // ignore } logger.info("session closed"); }
public void fireSessionClosed() { // Update future. try { session.getCloseFuture().setClosed(); } catch (Throwable t) { fireExceptionCaught(t); } // And start the chain. Entry head = this.head; callNextSessionClosed(head, session); }
@Override public void fireSessionClosed() { // Update future. try { session.getCloseFuture().setClosed(); } catch (Throwable t) { fireExceptionCaught(t); } // And start the chain. Entry head = this.head; callNextSessionClosed(head, session); }
@Override public void operationComplete(WriteFuture future) { if (future.isWritten()) { // We both sent and received CLOSE frames: close // the session. if (logger != null && logger.isTraceEnabled()) { logger.trace("received and sent CLOSE frames, closing session"); } if (closeFuture != null && closeFuture.isDone() == false) { closeFuture.cancel(true); } WsnSession wsnSession = SESSION_KEY.get(session); wsnSession.getCloseFuture().setClosed(); wsnSession.getProcessor().remove(wsnSession); } } });
/** * {@inheritDoc} */ @Override public void fireSessionClosed() { // Update future. try { session.getCloseFuture().setClosed(); } catch (Exception e) { fireExceptionCaught(e); } catch (Error e) { fireExceptionCaught(e); throw e; } // And start the chain. callNextSessionClosed(head, session); }
/** * {@inheritDoc} */ @Override public void fireSessionClosed() { // Update future. try { session.getCloseFuture().setClosed(); } catch (Exception e) { fireExceptionCaught(e); } catch (Error e) { fireExceptionCaught(e); throw e; } // And start the chain. callNextSessionClosed(head, session); }
httpSession.getCloseFuture().setClosed();