/** * Registers new {@link ProtocolFinder} - {@link FilterChain} pair, which * defines the protocol. * * @param protocolFinder {@link ProtocolFinder} * @param filterChain {@link FilterChain} * @return {@link PUProtocol}, which wraps passed {@link ProtocolFinder} and {@link FilterChain}. */ public PUProtocol register(final ProtocolFinder protocolFinder, final FilterChain filterChain) { final PUProtocol puProtocol = new PUProtocol(protocolFinder, filterChain); register(puProtocol); return puProtocol; }
/** * Registers new {@link ProtocolFinder} - {@link FilterChain} pair, which * defines the protocol. * * @param protocolFinder {@link ProtocolFinder} * @param filterChain {@link FilterChain} * @return {@link PUProtocol}, which wraps passed {@link ProtocolFinder} and {@link FilterChain}. */ public PUProtocol register(final ProtocolFinder protocolFinder, final FilterChain filterChain) { final PUProtocol puProtocol = new PUProtocol(protocolFinder, filterChain); register(puProtocol); return puProtocol; }
/** * Registers new {@link ProtocolFinder} - {@link FilterChain} pair, which * defines the protocol. * * @param protocolFinder {@link ProtocolFinder} * @param filterChain {@link FilterChain} * @return {@link PUProtocol}, which wraps passed {@link ProtocolFinder} and {@link FilterChain}. */ public PUProtocol register(final ProtocolFinder protocolFinder, final FilterChain filterChain) { final PUProtocol puProtocol = new PUProtocol(protocolFinder, filterChain); register(puProtocol); return puProtocol; }
/** * Registers new {@link ProtocolFinder} - {@link FilterChain} pair, which * defines the protocol. * * @param protocolFinder {@link ProtocolFinder} * @param filterChain {@link FilterChain} * @return {@link PUProtocol}, which wraps passed {@link ProtocolFinder} and {@link FilterChain}. */ public PUProtocol register(final ProtocolFinder protocolFinder, final FilterChain filterChain) { final PUProtocol puProtocol = new PUProtocol(protocolFinder, filterChain); register(puProtocol); return puProtocol; }
/** * Registers new {@link ProtocolFinder} - {@link FilterChain} pair, which * defines the protocol. * * @param protocolFinder {@link ProtocolFinder} * @param filterChain {@link FilterChain} * @return {@link PUProtocol}, which wraps passed {@link ProtocolFinder} and {@link FilterChain}. */ public PUProtocol register(final ProtocolFinder protocolFinder, final FilterChain filterChain) { final PUProtocol puProtocol = new PUProtocol(protocolFinder, filterChain); register(puProtocol); return puProtocol; }
/** * Registers new {@link ProtocolFinder} - {@link FilterChain} pair, which * defines the protocol. * * @param protocolFinder {@link ProtocolFinder} * @param filterChain {@link FilterChain} * @return {@link PUProtocol}, which wraps passed {@link ProtocolFinder} and {@link FilterChain}. */ public PUProtocol register(final ProtocolFinder protocolFinder, final FilterChain filterChain) { final PUProtocol puProtocol = new PUProtocol(protocolFinder, filterChain); register(puProtocol); return puProtocol; }
/** * Registers new {@link ProtocolFinder} - {@link FilterChain} pair, which * defines the protocol. * * @param protocolFinder {@link ProtocolFinder} * @param filterChain {@link FilterChain} * @return {@link PUProtocol}, which wraps passed {@link ProtocolFinder} and {@link FilterChain}. */ public PUProtocol register(final ProtocolFinder protocolFinder, final FilterChain filterChain) { final PUProtocol puProtocol = new PUProtocol(protocolFinder, filterChain); register(puProtocol); return puProtocol; }
/** * Registers new {@link ProtocolFinder} - {@link FilterChain} pair, which * defines the protocol. * * @param protocolFinder {@link ProtocolFinder} * @param filterChain {@link FilterChain} * @return {@link PUProtocol}, which wraps passed {@link ProtocolFinder} and {@link FilterChain}. */ public PUProtocol register(final ProtocolFinder protocolFinder, final FilterChain filterChain) { final PUProtocol puProtocol = new PUProtocol(protocolFinder, filterChain); register(puProtocol); return puProtocol; }
/** * Registers new {@link ProtocolFinder} - {@link FilterChain} pair, which * defines the protocol. * * @param protocolFinder {@link ProtocolFinder} * @param filterChain {@link FilterChain} * @return {@link PUProtocol}, which wraps passed {@link ProtocolFinder} and {@link FilterChain}. */ public PUProtocol register(final ProtocolFinder protocolFinder, final FilterChain filterChain) { final PUProtocol puProtocol = new PUProtocol(protocolFinder, filterChain); register(puProtocol); return puProtocol; }
/** * Registers new {@link ProtocolFinder} - {@link FilterChain} pair, which * defines the protocol. * * @param protocolFinder {@link ProtocolFinder} * @param filterChain {@link FilterChain} * @return {@link PUProtocol}, which wraps passed {@link ProtocolFinder} and {@link FilterChain}. */ public PUProtocol register(final ProtocolFinder protocolFinder, final FilterChain filterChain) { final PUProtocol puProtocol = new PUProtocol(protocolFinder, filterChain); register(puProtocol); return puProtocol; }
/** * Registers new {@link ProtocolFinder} - {@link FilterChain} pair, which * defines the protocol. * * @param protocolFinder {@link ProtocolFinder} * @param filterChain {@link FilterChain} * @return {@link PUProtocol}, which wraps passed {@link ProtocolFinder} and {@link FilterChain}. */ public PUProtocol register(final ProtocolFinder protocolFinder, final FilterChain filterChain) { final PUProtocol puProtocol = new PUProtocol(protocolFinder, filterChain); register(puProtocol); return puProtocol; }
@Override public void setup(final NetworkListener networkListener, final FilterChainBuilder builder) { // Create PUFilter. // We will try to filter off "add" and "sub" protocols, if they // are not recognize - assume it's HTTP. // So we don't need to register HTTP ProtocolFinder, but have to // pass <tt>false</tt> to the constructor to not let "unrecognized" // connections to be closed (because they might be HTTP). final PUFilter puFilter = new PUFilter(false); // Configure add-service PUProtocol final PUProtocol addProtocol = configureAddProtocol(puFilter); // Configure sub-service PUProtocol final PUProtocol subProtocol = configureSubProtocol(puFilter); // Register add-service pu protocol puFilter.register(addProtocol); // Register sub-service pu protocol puFilter.register(subProtocol); // now find the place to insert PUFilter in the HTTP FilterChainBuilder. // we'll insert the PUFilter right next to the TransportFilter final int transportFilterIdx = builder.indexOfType(TransportFilter.class); assert transportFilterIdx != -1; builder.add(transportFilterIdx + 1, puFilter); }
extraSslPUFilter.register(protocolFinder, extraSslPUFilterChainBuilder.build()); puFilter.register(new SSLProtocolFinder( new SSLConfigurator(habitat, subProtocol.getSsl())), subProtocolFilterChainBuilder.build()); configureSubProtocol(habitat, networkListener, subProtocol, subProtocolFilterChainBuilder); puFilter.register(protocolFinder, subProtocolFilterChainBuilder.build());
extraSslPUFilter.register(protocolFinder, extraSslPUFilterChainBuilder.build()); puFilter.register(new SSLProtocolFinder( new SSLConfigurator(habitat, subProtocol.getSsl())), subProtocolFilterChainBuilder.build()); configureSubProtocol(habitat, networkListener, subProtocol, subProtocolFilterChainBuilder); puFilter.register(protocolFinder, subProtocolFilterChainBuilder.build());