/** * Add a protocol to this handler. * * @param productString the product string to match * @param openListener the open listener to call * @param handshake a handshake implementation that can be used to verify the client request and modify the response */ public synchronized void addProtocol(String productString, ChannelListener<? super StreamConnection> openListener, final HttpUpgradeHandshake handshake) { addProtocol(productString, null, openListener, handshake); }
public HttpListenerService(String name, final String serverName, OptionMap listenerOptions, OptionMap socketOptions, boolean certificateForwarding, boolean proxyAddressForwarding, boolean proxyProtocol) { super(name, listenerOptions, socketOptions, proxyProtocol); this.serverName = serverName; addWrapperHandler(handler -> { httpUpgradeHandler.setNonUpgradeHandler(handler); return httpUpgradeHandler; }); if(listenerOptions.get(UndertowOptions.ENABLE_HTTP2, false)) { addWrapperHandler(Http2UpgradeHandler::new); } if (certificateForwarding) { addWrapperHandler(SSLHeaderHandler::new); } if (proxyAddressForwarding) { addWrapperHandler(ProxyPeerAddressHandler::new); } }
@Override public synchronized void stop(final StopContext context) { listenerRegistry.getValue().getListener(httpConnectorName).removeHttpUpgradeMetadata(httpUpgradeMetadata); httpUpgradeMetadata = null; injectedRegistry.getValue().removeProtocol(JBOSS_REMOTING); }
final ChannelUpgradeHandler upgradeHandler = new ChannelUpgradeHandler(); context.getChildTarget().addService(HTTP_UPGRADE_SERVICE_NAME, new ValueService<Object>(new ImmediateValue<Object>(upgradeHandler)))
public HttpListenerService(String name, final String serverName, OptionMap listenerOptions, OptionMap socketOptions, boolean certificateForwarding, boolean proxyAddressForwarding, boolean proxyProtocol) { super(name, listenerOptions, socketOptions, proxyProtocol); this.serverName = serverName; addWrapperHandler(handler -> { httpUpgradeHandler.setNonUpgradeHandler(handler); return httpUpgradeHandler; }); if(listenerOptions.get(UndertowOptions.ENABLE_HTTP2, false)) { addWrapperHandler(Http2UpgradeHandler::new); } if (certificateForwarding) { addWrapperHandler(SSLHeaderHandler::new); } if (proxyAddressForwarding) { addWrapperHandler(ProxyPeerAddressHandler::new); } }
@Override public void stop(StopContext context) { listenerRegistry.getValue().getListener(httpListenerName).removeHttpUpgradeMetadata(httpUpgradeMetadata); httpUpgradeMetadata = null; injectedRegistry.getValue().removeProtocol(getProtocol(), httpUpgradeListener); httpUpgradeListener = null; }
final ChannelUpgradeHandler upgradeHandler = new ChannelUpgradeHandler(); context.getChildTarget().addService(HTTP_UPGRADE_SERVICE_NAME, new ValueService<Object>(new ImmediateValue<Object>(upgradeHandler)))
/** * Add a protocol to this handler. * * @param productString the product string to match * @param openListener the open listener to call */ public void addProtocol(String productString, ChannelListener<? super StreamConnection> openListener) { addProtocol(productString, openListener, null); }
public HttpListenerService(String name, final String serverName, OptionMap listenerOptions, OptionMap socketOptions, boolean certificateForwarding, boolean proxyAddressForwarding, boolean proxyProtocol) { super(name, listenerOptions, socketOptions, proxyProtocol); this.serverName = serverName; addWrapperHandler(handler -> { httpUpgradeHandler.setNonUpgradeHandler(handler); return httpUpgradeHandler; }); if(listenerOptions.get(UndertowOptions.ENABLE_HTTP2, false)) { addWrapperHandler(Http2UpgradeHandler::new); } if (certificateForwarding) { addWrapperHandler(SSLHeaderHandler::new); } if (proxyAddressForwarding) { addWrapperHandler(ProxyPeerAddressHandler::new); } }
@Override public void stop(StopContext context) { listenerRegistry.getValue().getListener(httpListenerName).removeHttpUpgradeMetadata(httpUpgradeMetadata); httpUpgradeMetadata = null; injectedRegistry.getValue().removeProtocol(getProtocol(), httpUpgradeListener); httpUpgradeListener = null; }
final ChannelUpgradeHandler upgradeHandler = new ChannelUpgradeHandler(); context.getChildTarget().addService(HTTP_UPGRADE_SERVICE_NAME, new ValueService<Object>(new ImmediateValue<Object>(upgradeHandler)))
/** * Add a protocol to this handler. * * @param productString the product string to match * @param openListener the open listener to call * @param handshake a handshake implementation that can be used to verify the client request and modify the response */ public synchronized void addProtocol(String productString, HttpUpgradeListener openListener, final HttpUpgradeHandshake handshake) { addProtocol(productString, openListener, null, handshake); }
HttpHandler current = pathHandler; if (builder.upgradeHandler != null) { builder.upgradeHandler.setNonUpgradeHandler(current); current = builder.upgradeHandler;
/** * Add a protocol to this handler. * * @param productString the product string to match * @param openListener the open listener to call */ public void addProtocol(String productString, HttpUpgradeListener openListener) { addProtocol(productString, openListener, null); }
/** * Add a protocol to this handler. * * @param productString the product string to match * @param openListener the open listener to call */ public void addProtocol(String productString, ChannelListener<? super StreamConnection> openListener) { addProtocol(productString, openListener, null); }
/** * Add a protocol to this handler. * * @param productString the product string to match * @param openListener the open listener to call * @param handshake a handshake implementation that can be used to verify the client request and modify the response */ public synchronized void addProtocol(String productString, ChannelListener<? super StreamConnection> openListener, final HttpUpgradeHandshake handshake) { addProtocol(productString, null, openListener, handshake); }
/** * Add a protocol to this handler. * * @param productString the product string to match * @param openListener the open listener to call */ public void addProtocol(String productString, HttpUpgradeListener openListener) { addProtocol(productString, openListener, null); }
/** * Add a protocol to this handler. * * @param productString the product string to match * @param openListener the open listener to call * @param handshake a handshake implementation that can be used to verify the client request and modify the response */ public synchronized void addProtocol(String productString, HttpUpgradeListener openListener, final HttpUpgradeHandshake handshake) { addProtocol(productString, openListener, null, handshake); }
/** * Add a protocol to this handler. * * @param productString the product string to match * @param openListener the open listener to call */ public void addProtocol(String productString, ChannelListener<? super StreamConnection> openListener) { addProtocol(productString, openListener, null); }
/** * Add a protocol to this handler. * * @param productString the product string to match * @param openListener the open listener to call * @param handshake a handshake implementation that can be used to verify the client request and modify the response */ public synchronized void addProtocol(String productString, ChannelListener<? super StreamConnection> openListener, final HttpUpgradeHandshake handshake) { addProtocol(productString, null, openListener, handshake); }