use of org.infinispan.rest.ALPNHandler in project infinispan by infinispan.
the class SinglePortChannelInitializer method initializeChannel.
@Override
public void initializeChannel(Channel ch) throws Exception {
super.initializeChannel(ch);
upgradeServers.values().stream().filter(ps -> ps instanceof HotRodServer).findFirst().ifPresent(hotRodServer -> ch.pipeline().addLast(HotRodPingDetector.NAME, new HotRodPingDetector((HotRodServer) hotRodServer)));
upgradeServers.values().stream().filter(ps -> ps instanceof RespServer).findFirst().ifPresent(respServer -> ch.pipeline().addLast(RespDetector.NAME, new RespDetector((RespServer) respServer)));
if (server.getConfiguration().ssl().enabled()) {
ch.pipeline().addLast(new ALPNHandler(restServer));
} else {
ALPNHandler.configurePipeline(ch.pipeline(), ApplicationProtocolNames.HTTP_1_1, restServer, upgradeServers);
}
}
Aggregations