code: public void retrieveEngine() throws GeneralSecurityException, IOException {
          if (serverEngineFactory == null) {
              return;
          }
          engine = serverEngineFactory.retrieveHTTPServerEngine(nurl.getPort());
          if (engine == null) {
              engine = serverEngineFactory.getHTTPServerEngine(nurl.getHost(), nurl.getPort(), nurl.getProtocol());
          }
  
          assert engine != null;
          TLSServerParameters serverParameters = engine.getTlsServerParameters();
          if (serverParameters != null && serverParameters.getCertConstraints() != null) {
              CertificateConstraintsType constraints = serverParameters.getCertConstraints();
              if (constraints != null) {
                  certConstraints = CertConstraintsJaxBUtils.createCertConstraints(constraints);
              }
          }
  
          // When configuring for "http", however, it is still possible that
          // Spring configuration has configured the port for https.
          if (!nurl.getProtocol().equals(engine.getProtocol())) {
              throw new IllegalStateException("Port " + engine.getPort() + " is configured with wrong protocol \"" + engine.getProtocol() + "\" for \"" + nurl + "\"");
          }
      }
docs: Post-configure retreival of server engine.