@Override public final boolean removeBinding(ResourceAddress address, Binding oldBinding) { NextProtocolBinding nextBinding = super.getBinding0(address); if (nextBinding != null) { if (nextBinding.removeBinding(address, oldBinding) && nextBinding.getNextProtocolNames().size() == 0) { removeBinding1(address, nextBinding); return true; } } return false; }
@Override protected void doSessionCreated(IoSessionEx session) throws Exception { LoggingFilter.addIfNeeded(logger, session, transportName); ResourceAddress candidateAddress = getCandidateResourceAddress(session); NextProtocolBindings.NextProtocolBinding nextBinding = bindings.getBinding0(candidateAddress); if (nextBinding == null) { // next-protocol not currently bound for this address session.close(true); return; } SortedSet<String> nextProtocolNames = nextBinding.getNextProtocolNames(); if (nextProtocolNames == null || nextProtocolNames.isEmpty()) { NEXT_PROTOCOL_KEY.set(session, null); } else if (nextProtocolNames.size() == 1) { NEXT_PROTOCOL_KEY.set(session, nextProtocolNames.first()); } else { Collection<ProtocolDispatcher> dispatchers = bridgeServiceFactory.getTransportFactory().getProtocolDispatchers().values(); // sessionCreated will be sent down pipeline again when next-protocol has been determined NextProtocolFilter nextProtocol = new NextProtocolFilter(dispatchers); IoFilterChain filterChain = session.getFilterChain(); filterChain.addLast(AbstractNioAcceptor.NEXT_PROTOCOL_FILTER, nextProtocol); } }
SortedSet<String> nextProtocolNames = nioBinding.getNextProtocolNames(); if (nextProtocolNames == null || nextProtocolNames.isEmpty()) { NEXT_PROTOCOL_KEY.set(session, null);
return; SortedSet<String> nextProtocolNames = sslBinding.getNextProtocolNames(); if (nextProtocolNames.isEmpty()) { NEXT_PROTOCOL_KEY.set(session, null);
SortedSet<String> nextProtocolNames = nioBinding.getNextProtocolNames(); if (nextProtocolNames == null || nextProtocolNames.isEmpty()) { NEXT_PROTOCOL_KEY.set(session, null);