/** * This call sets TLSServerParameters for a JettyHTTPServerEngine * that will be subsequently created. It will not alter an engine * that has already been created for that network port. * @param host if not null, server will listen on this address/host, * otherwise, server will listen on all local addresses. * @param port The network port number to bind to the engine. * @param tlsParams The tls server parameters. Cannot be null. * @throws IOException * @throws GeneralSecurityException */ public void setTLSServerParametersForPort( String host, int port, TLSServerParameters tlsParams) throws GeneralSecurityException, IOException { if (tlsParams == null) { throw new IllegalArgumentException("tlsParams cannot be null"); } JettyHTTPServerEngine ref = retrieveJettyHTTPServerEngine(port); if (null == ref) { getOrCreate(this, host, port, tlsParams); } else { if (ref.getConnector() != null && ref.getConnector().isRunning()) { throw new IOException("can't set the TLS params on the opened connector"); } ref.setTlsServerParameters(tlsParams); } }
/** * This call sets TLSServerParameters for a JettyHTTPServerEngine * that will be subsequently created. It will not alter an engine * that has already been created for that network port. * @param host if not null, server will listen on this address/host, * otherwise, server will listen on all local addresses. * @param port The network port number to bind to the engine. * @param tlsParams The tls server parameters. Cannot be null. * @throws IOException * @throws GeneralSecurityException */ public void setTLSServerParametersForPort( String host, int port, TLSServerParameters tlsParams) throws GeneralSecurityException, IOException { if (tlsParams == null) { throw new IllegalArgumentException("tlsParams cannot be null"); } JettyHTTPServerEngine ref = retrieveJettyHTTPServerEngine(port); if (null == ref) { getOrCreate(this, host, port, tlsParams); } else { if (ref.getConnector() != null && ref.getConnector().isRunning()) { throw new IOException("can't set the TLS params on the opened connector"); } ref.setTlsServerParameters(tlsParams); } }
/** * This call sets TLSServerParameters for a JettyHTTPServerEngine * that will be subsequently created. It will not alter an engine * that has already been created for that network port. * @param host if not null, server will listen on this address/host, * otherwise, server will listen on all local addresses. * @param port The network port number to bind to the engine. * @param tlsParams The tls server parameters. Cannot be null. * @throws IOException * @throws GeneralSecurityException */ public void setTLSServerParametersForPort( String host, int port, TLSServerParameters tlsParams) throws GeneralSecurityException, IOException { if (tlsParams == null) { throw new IllegalArgumentException("tlsParams cannot be null"); } JettyHTTPServerEngine ref = retrieveJettyHTTPServerEngine(port); if (null == ref) { getOrCreate(this, host, port, tlsParams); } else { if (ref.getConnector() != null && ref.getConnector().isRunning()) { throw new IOException("can't set the TLS params on the opened connector"); } ref.setTlsServerParameters(tlsParams); } }