Source:
<code>public void init(Session session, Map<String, String> parameters) throws OpenAS2Exception { super.init(session, parameters); logger.info(this.getName() + " initialized..."); final ResourceConfig rc = new ResourceConfig(); rc.register(new AuthenticationFilter( parameters.getOrDefault("userid","userid"), parameters.getOrDefault("password","pWd") )).register(new ControlResource(this)); URI baseUri = URI.create(parameters.getOrDefault("baseuri", BASE_URI)); try { <START> if (baseUri.getScheme().equalsIgnoreCase("https")) { <END> SSLContextConfigurator sslCon = new SSLContextConfigurator(); sslCon.setKeyStoreFile(parameters.get("ssl_keystore")); sslCon.setKeyStorePass(parameters.getOrDefault("ssl_keystore_password", "")); GrizzlyHttpContainer container = (GrizzlyHttpContainer) ContainerFactory.createContainer(GrizzlyHttpContainer.class, rc); SSLEngineConfigurator sslEngineConfigurator = new SSLEngineConfigurator(sslCon, false, false, false); server = GrizzlyHttpServerFactory.createHttpServer(baseUri, container, true, sslEngineConfigurator, true); } else { server = GrizzlyHttpServerFactory.createHttpServer(baseUri, rc); } server.start(); } catch (IOException ex) { Logger.getLogger(RestCommandProcessor.class.getName()).log(Level.SEVERE, null, ex); } }</code><technical_language>a log statement helpful</technical_language>

Target:
public void init(Session session, Map<String, String> parameters) throws OpenAS2Exception { try { super.init(session, parameters); logger.info(this.getName() + " initialized..."); final ResourceConfig rc = new ResourceConfig(); rc.register(new LoggerRequestFilter(logger)) .register(new AuthenticationRequestFilter( parameters.getOrDefault("userid","userid"), parameters.getOrDefault("password","pWd") )) .register(new ApiResource(this)) .register(new CORSFilter()); URI baseUri = URI.create(parameters.getOrDefault("baseuri", BASE_URI)); logger.info("Creating and starting a new instance of grizzly http server"); logger.info("Exposing the Jersey application at "+baseUri); if (baseUri.getScheme().equalsIgnoreCase("https")) { SSLContextConfigurator sslCon = new SSLContextConfigurator(); String keystore = parameters.get("ssl_keystore"); if(null == keystore) { throw new RuntimeException("Missing SSL Keystore parameter in the configuration. You cannot use SSL without a Certificate"); } sslCon.setKeyStoreFile(keystore); sslCon.setKeyStorePass(parameters.getOrDefault("ssl_keystore_password", "")); sslCon.setSecurityProtocol(parameters.getOrDefault("ssl_protocol", "TLS")); GrizzlyHttpContainer container = (GrizzlyHttpContainer) ContainerFactory.createContainer(GrizzlyHttpContainer.class, rc); SSLEngineConfigurator sslEngineConfigurator = new SSLEngineConfigurator(sslCon, false, false, false); server = GrizzlyHttpServerFactory.createHttpServer(baseUri, container, true, sslEngineConfigurator, true); } else { server = GrizzlyHttpServerFactory.createHttpServer(baseUri, rc); } server.start(); } catch (IOException ex) { Logger.getLogger(RestCommandProcessor.class.getName()).log(Level.SEVERE, null, ex); throw new OpenAS2Exception(ex); } catch (RuntimeException ex) { Logger.getLogger(RestCommandProcessor.class.getName()).log(Level.SEVERE, null, ex); throw new OpenAS2Exception(ex); } }