Class BCJsseServerALPNProcessor

java.lang.Object
org.apache.cxf.transport.http_jetty.BCJsseServerALPNProcessor
All Implemented Interfaces:
org.eclipse.jetty.io.ssl.ALPNProcessor, org.eclipse.jetty.io.ssl.ALPNProcessor.Server

public class BCJsseServerALPNProcessor extends Object implements org.eclipse.jetty.io.ssl.ALPNProcessor.Server
Jetty ALPNProcessor.Server for BouncyCastle JSSE (bctls-jdk18on).

Jetty's built-in JDK9ServerALPNProcessor only matches engines whose module is java.base, so it rejects BC JSSE's ProvSSLEngine and throws IllegalStateException: No suitable ALPNProcessor. This processor bridges the gap: it claims BC JSSE engines and wires up the same SSLEngine.setHandshakeApplicationProtocolSelector(java.util.function.BiFunction<javax.net.ssl.SSLEngine, java.util.List<java.lang.String>, java.lang.String>) callback that the built-in processor uses, delegating to ALPNServerConnection.select(java.util.List<java.lang.String>).

A SslHandshakeListener is also registered so that if the client does not advertise any ALPN protocols, ALPNServerConnection.unsupported() is called on handshake success to fall back to the server's default protocol (HTTP/1.1).

Registered via META-INF/services/org.eclipse.jetty.io.ssl.ALPNProcessor$Server.

  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.eclipse.jetty.io.ssl.ALPNProcessor

    org.eclipse.jetty.io.ssl.ALPNProcessor.Client, org.eclipse.jetty.io.ssl.ALPNProcessor.Server
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    appliesTo(SSLEngine sslEngine)
     
    void
    configure(SSLEngine sslEngine, org.eclipse.jetty.io.Connection connection)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.eclipse.jetty.io.ssl.ALPNProcessor

    init
  • Constructor Details

    • BCJsseServerALPNProcessor

      public BCJsseServerALPNProcessor()
  • Method Details

    • appliesTo

      public boolean appliesTo(SSLEngine sslEngine)
      Specified by:
      appliesTo in interface org.eclipse.jetty.io.ssl.ALPNProcessor
    • configure

      public void configure(SSLEngine sslEngine, org.eclipse.jetty.io.Connection connection)
      Specified by:
      configure in interface org.eclipse.jetty.io.ssl.ALPNProcessor