@Override protected boolean shouldAccountForWrittenBytes(WsnSession session) { return !session.getLocalAddress().getOption(LIGHTWEIGHT); } }
@Override protected void doSessionClosed(IoSessionEx session) throws Exception { WsnSession wsnSession = SESSION_KEY.remove(session); if (wsnSession != null && !wsnSession.isClosing()) { boolean isWsx = !wsnSession.getLocalAddress().getOption(CODEC_REQUIRED); if (isWsx) { wsnSession.getProcessor().remove(wsnSession); } else { wsnSession.reset( new IOException(LoggingUtils.NETWORK_CONNECTIVITY_ERROR_MESSAGE, wsnSession.getCloseException()).fillInStackTrace()); } } IoFilterChain filterChain = session.getFilterChain(); removeBridgeFilters(filterChain); }
Boolean codecRequired = wsnSession.getLocalAddress().getOption(CODEC_REQUIRED);
@Override protected Object getMessageFromWriteRequest(WsnSession session, WriteRequest request) { Object message = super.getMessageFromWriteRequest(session, request); boolean unwrapWsMessages = session.getLocalAddress().getOption(LIGHTWEIGHT); if (unwrapWsMessages && message instanceof WsMessage) { WsMessage wsMessage = (WsMessage)message;
final ResourceAddress wsnSessionLocalAddress = wsnSession.getLocalAddress(); final boolean isLightweightWsnSession = wsnSessionLocalAddress.getOption(LIGHTWEIGHT); boolean sendMessagesDirect = isLightweightWsnSession