@Override public ChannelHandlerContext getSendingContext() { return session.connectionContext(); }
@Override public ChannelHandlerContext getSendingContext() { return session.connectionContext(); }
@Override public boolean isInUse() { return session.connectionContext().channel().isActive(); }
@Override public boolean isInUse() { return session.connectionContext().channel().isActive(); }
@Override public boolean isInUse() { return getSockJsSession().connectionContext().channel().isActive(); }
@Override public boolean isInUse() { return getSockJsSession().connectionContext().channel().isActive(); }
@Override public ChannelHandlerContext getSendingContext() { return getSockJsSession().connectionContext(); }
@Override public void onSockJSServerInitiatedClose() { if (logger.isDebugEnabled()) { logger.debug("Will close session connectionContext {}", session.connectionContext()); } session.connectionContext().close(); sessions.remove(session.sessionId()); }
@Override public ChannelHandlerContext getSendingContext() { return getSockJsSession().connectionContext(); }
@Override public void onSockJSServerInitiatedClose() { final ChannelHandlerContext context = getSockJsSession().connectionContext(); if (context != null) { //could be null if the request is aborted, for example due to missing callback. logger.debug("Will close session connectionContext " + getSockJsSession().connectionContext()); context.close(); } }
@Override public void onSockJSServerInitiatedClose() { if (logger.isDebugEnabled()) { logger.debug("Will close session connectionContext {}", session.connectionContext()); } session.connectionContext().close(); sessions.remove(session.sessionId()); }
@Override public void onSockJSServerInitiatedClose() { final ChannelHandlerContext context = getSockJsSession().connectionContext(); if (context != null) { //could be null if the request is aborted, for example due to missing callback. logger.debug("Will close session connectionContext " + getSockJsSession().connectionContext()); context.close(); } }
@Override public boolean isInUse() { return getSockJsSession().connectionContext().channel().isActive() || getSockJsSession().inuse(); }
@Override public void onSockJSServerInitiatedClose() { final ChannelHandlerContext context = getSockJsSession().connectionContext(); if (context != null) { //could be null if the request is aborted, for example due to missing callback. if (logger.isDebugEnabled()) { logger.debug("Will close session connectionContext {}", getSockJsSession().connectionContext()); } context.close(); } sessions.remove(getSockJsSession().sessionId()); }
@Override public boolean isInUse() { return getSockJsSession().connectionContext().channel().isActive() || getSockJsSession().inuse(); }
@Override public void onSockJSServerInitiatedClose() { final ChannelHandlerContext context = getSockJsSession().connectionContext(); if (context != null) { //could be null if the request is aborted, for example due to missing callback. if (logger.isDebugEnabled()) { logger.debug("Will close session connectionContext {}", getSockJsSession().connectionContext()); } context.close(); } sessions.remove(getSockJsSession().sessionId()); }
@Override public ChannelHandlerContext getSendingContext() { final ChannelHandlerContext openContext = getSockJsSession().openContext(); return openContext == null ? getSockJsSession().connectionContext() : openContext; }
@Override public ChannelHandlerContext getSendingContext() { final ChannelHandlerContext openContext = getSockJsSession().openContext(); return openContext == null ? getSockJsSession().connectionContext() : openContext; }
@Override public void run() { final long now = TimeUnit.NANOSECONDS.toMillis(System.nanoTime()); if (isInUse()) { return; } if (session.timestamp() + session.config().sessionTimeout() < now) { final SockJsSession removed = sessions.remove(session.sessionId()); session.connectionContext().close(); sessionTimer.cancel(true); heartbeatFuture.cancel(true); if (logger.isDebugEnabled()) { logger.debug("Removed {} from map[{}]", removed.sessionId(), sessions.size()); } } } }, session.config().sessionTimeout(), session.config().sessionTimeout(), TimeUnit.MILLISECONDS);
@Override public void run() { final long now = TimeUnit.NANOSECONDS.toMillis(System.nanoTime()); if (isInUse()) { return; } if (session.timestamp() + session.config().sessionTimeout() < now) { final SockJsSession removed = sessions.remove(session.sessionId()); session.connectionContext().close(); sessionTimer.cancel(true); heartbeatFuture.cancel(true); if (logger.isDebugEnabled()) { logger.debug("Removed {} from map[{}]", removed.sessionId(), sessions.size()); } } } }, session.config().sessionTimeout(), session.config().sessionTimeout(), TimeUnit.MILLISECONDS);