Source:
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 = 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); } }

Target:
public void init(Session session, Map<String, String> parameters) throws OpenAS2Exception { try { super.init(session, parameters); logger.info(this.getName() + " initialized..."); final String userId = parameters.getOrDefault("userid", "userid"); final String password = parameters.getOrDefault("password", "pWd"); final ResourceConfig rc = new ResourceConfig(); rc.register(new LoggerRequestFilter(logger)) .register(new AuthenticationRequestFilter(userId, password)) .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 = 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); } }