Tabnine Logo
HttpConfiguration.setSecureScheme
Code IndexAdd Tabnine to your IDE (free)

How to use
setSecureScheme
method
in
org.eclipse.jetty.server.HttpConfiguration

Best Java code snippets using org.eclipse.jetty.server.HttpConfiguration.setSecureScheme (Showing top 20 results out of 756)

origin: perwendel/spark

private static HttpConnectionFactory createHttpConnectionFactory() {
  HttpConfiguration httpConfig = new HttpConfiguration();
  httpConfig.setSecureScheme("https");
  httpConfig.addCustomizer(new ForwardedRequestCustomizer());
  return new HttpConnectionFactory(httpConfig);
}
origin: apache/nifi

private ServerConnector createConnector(final SslContextFactory sslContextFactory, final Integer listenPort) {
  final ServerConnector serverConnector;
  if (sslContextFactory == null) {
    serverConnector = new ServerConnector(server);
  } else {
    final HttpConfiguration httpsConfiguration = new HttpConfiguration();
    httpsConfiguration.setSecureScheme("https");
    httpsConfiguration.addCustomizer(new SecureRequestCustomizer());
    serverConnector = new ServerConnector(server,
        new SslConnectionFactory(sslContextFactory, "http/1.1"),
        new HttpConnectionFactory(httpsConfiguration));
  }
  serverConnector.setPort(listenPort);
  return serverConnector;
}
origin: org.springframework.boot/spring-boot

private ServerConnector createConnector(Server server,
    SslContextFactory sslContextFactory, InetSocketAddress address) {
  HttpConfiguration config = new HttpConfiguration();
  config.setSendServerVersion(false);
  config.setSecureScheme("https");
  config.setSecurePort(address.getPort());
  config.addCustomizer(new SecureRequestCustomizer());
  ServerConnector connector = createServerConnector(server, sslContextFactory,
      config);
  connector.setPort(address.getPort());
  connector.setHost(address.getHostString());
  return connector;
}
origin: apache/nifi

private ServerConnector createUnconfiguredSslServerConnector(Server server, HttpConfiguration httpConfiguration, int port) {
  // add some secure config
  final HttpConfiguration httpsConfiguration = new HttpConfiguration(httpConfiguration);
  httpsConfiguration.setSecureScheme("https");
  httpsConfiguration.setSecurePort(port);
  httpsConfiguration.addCustomizer(new SecureRequestCustomizer());
  // build the connector
  return new ServerConnector(server,
      new SslConnectionFactory(createSslContextFactory(), "http/1.1"),
      new HttpConnectionFactory(httpsConfiguration));
}
origin: dropwizard/dropwizard

@Override
protected HttpConfiguration buildHttpConfiguration() {
  final HttpConfiguration config = super.buildHttpConfiguration();
  config.setSecureScheme("https");
  config.setSecurePort(getPort());
  config.addCustomizer(new SecureRequestCustomizer());
  return config;
}
origin: jersey/jersey

final HttpConfiguration config = new HttpConfiguration();
if (sslContextFactory != null) {
  config.setSecureScheme("https");
  config.setSecurePort(port);
  config.addCustomizer(new SecureRequestCustomizer());
origin: yahoo/mysql_perf_analyzer

/**
 * Create ssl connector if https is used
 * @return
 */
private ServerConnector sslConnector() {
  HttpConfiguration http_config = new HttpConfiguration();
  http_config.setSecureScheme("https");
  http_config.setSecurePort(this.getPort());
  
  HttpConfiguration https_config = new HttpConfiguration(http_config);
  https_config.addCustomizer(new SecureRequestCustomizer());
  
  SslContextFactory sslContextFactory = new SslContextFactory(this.getCertKeyStorePath());
  sslContextFactory.setKeyStorePassword(this.getCertKeyStorePassword());
  //exclude weak ciphers
  sslContextFactory.setExcludeCipherSuites("^.*_(MD5|SHA|SHA1)$");
  //only support tlsv1.2
  sslContextFactory.addExcludeProtocols("SSL", "SSLv2", "SSLv2Hello", "SSLv3", "TLSv1", "TLSv1.1");
  
  ServerConnector connector = new ServerConnector(jettyServer, 
      new SslConnectionFactory(sslContextFactory, "http/1.1"),
      new HttpConnectionFactory(https_config));
  connector.setPort(this.getPort());
  connector.setIdleTimeout(50000);
  return connector;
}

origin: DeemOpen/zkui

http_config.setSecureScheme("https");
http_config.setSecurePort(Integer.parseInt(globalProps.getProperty("serverPort")));
origin: AsyncHttpClient/async-http-client

public static ServerConnector addHttpsConnector(Server server) throws IOException, URISyntaxException {
 String keyStoreFile = resourceAsFile("ssltest-keystore.jks").getAbsolutePath();
 SslContextFactory sslContextFactory = new SslContextFactory(keyStoreFile);
 sslContextFactory.setKeyStorePassword("changeit");
 String trustStoreFile = resourceAsFile("ssltest-cacerts.jks").getAbsolutePath();
 sslContextFactory.setTrustStorePath(trustStoreFile);
 sslContextFactory.setTrustStorePassword("changeit");
 HttpConfiguration httpsConfig = new HttpConfiguration();
 httpsConfig.setSecureScheme("https");
 httpsConfig.addCustomizer(new SecureRequestCustomizer());
 ServerConnector connector = new ServerConnector(server, new SslConnectionFactory(sslContextFactory, "http/1.1"), new HttpConnectionFactory(httpsConfig));
 server.addConnector(connector);
 return connector;
}
origin: apache/hbase

String scheme = ep.getScheme();
HttpConfiguration httpConfig = new HttpConfiguration();
httpConfig.setSecureScheme("https");
httpConfig.setHeaderCacheSize(DEFAULT_MAX_HEADER_SIZE);
httpConfig.setResponseHeaderSize(DEFAULT_MAX_HEADER_SIZE);
origin: apache/hbase

httpConfig.setSecureScheme("https");
httpConfig.setSecurePort(listenPort);
httpConfig.setHeaderCacheSize(DEFAULT_HTTP_MAX_HEADER_SIZE);
origin: apache/flume

httpConfiguration.setSecureScheme("https");
origin: apache/ignite

HttpConfiguration httpCfg = new HttpConfiguration();
httpCfg.setSecureScheme("https");
httpCfg.setSecurePort(8443);
httpCfg.setSendServerVersion(true);
origin: igniterealtime/Openfire

private Connector createSSLConnector( final Server httpBindServer ) {
  final int securePort = getHttpBindSecurePort();
  try {
    final IdentityStore identityStore = XMPPServer.getInstance().getCertificateStoreManager().getIdentityStore( ConnectionType.BOSH_C2S );
    if (securePort > 0 && identityStore.getStore().aliases().hasMoreElements() ) {
      if ( !identityStore.containsDomainCertificate( ) ) {
        Log.warn("HTTP binding: Using certificates but they are not valid for the hosted domain");
      }
      final ConnectionManagerImpl connectionManager = ((ConnectionManagerImpl) XMPPServer.getInstance().getConnectionManager());
      final ConnectionConfiguration configuration = connectionManager.getListener( ConnectionType.BOSH_C2S, true ).generateConnectionConfiguration();
      final SslContextFactory sslContextFactory = new EncryptionArtifactFactory(configuration).getSslContextFactory();
      final HttpConfiguration httpsConfig = new HttpConfiguration();
      httpsConfig.setSecureScheme("https");
      httpsConfig.setSecurePort(securePort);
      configureProxiedConnector(httpsConfig);
      httpsConfig.addCustomizer(new SecureRequestCustomizer());
      final ServerConnector sslConnector = new ServerConnector(httpBindServer, new SslConnectionFactory(sslContextFactory, "http/1.1"), new HttpConnectionFactory(httpsConfig));
      sslConnector.setHost(getBindInterface());
      sslConnector.setPort(securePort);
      return sslConnector;
    }
  }
  catch (Exception e) {
    Log.error("Error creating SSL connector for Http bind", e);
  }
  return null;
}
origin: kairosdb/kairosdb

httpConfig.setSecureScheme("https");
httpConfig.setSecurePort(m_sslPort);
httpConfig.addCustomizer(new SecureRequestCustomizer());
origin: ninjaframework/ninja

httpConfig.setSecureScheme("https");
httpConfig.setSecurePort(sslPort);
httpConfig.setOutputBufferSize(32768);
origin: apache/geode

httpConfig.setSecureScheme(HTTPS);
httpConfig.setSecurePort(port);
origin: org.apache.hadoop/hadoop-common

 private ServerConnector createHttpsChannelConnector(
   Server server, HttpConfiguration httpConfig) {
  httpConfig.setSecureScheme(HTTPS_SCHEME);
  httpConfig.addCustomizer(new SecureRequestCustomizer());
  ServerConnector conn = createHttpChannelConnector(server, httpConfig);
  SslContextFactory sslContextFactory = new SslContextFactory();
  sslContextFactory.setNeedClientAuth(needsClientAuth);
  sslContextFactory.setKeyManagerPassword(keyPassword);
  if (keyStore != null) {
   sslContextFactory.setKeyStorePath(keyStore);
   sslContextFactory.setKeyStoreType(keyStoreType);
   sslContextFactory.setKeyStorePassword(keyStorePassword);
  }
  if (trustStore != null) {
   sslContextFactory.setTrustStorePath(trustStore);
   sslContextFactory.setTrustStoreType(trustStoreType);
   sslContextFactory.setTrustStorePassword(trustStorePassword);
  }
  if(null != excludeCiphers && !excludeCiphers.isEmpty()) {
   sslContextFactory.setExcludeCipherSuites(
     StringUtils.getTrimmedStrings(excludeCiphers));
   LOG.info("Excluded Cipher List:" + excludeCiphers);
  }
  conn.addFirstConnectionFactory(new SslConnectionFactory(sslContextFactory,
    HttpVersion.HTTP_1_1.asString()));
  return conn;
 }
}
origin: igniterealtime/Openfire

httpsConfig.setSecureScheme( "https" );
httpsConfig.setSecurePort( adminSecurePort );
httpsConfig.addCustomizer( new SecureRequestCustomizer() );
origin: apache/incubator-druid

httpsConfiguration.setSecureScheme("https");
httpsConfiguration.setSecurePort(node.getTlsPort());
httpsConfiguration.addCustomizer(new SecureRequestCustomizer());
org.eclipse.jetty.serverHttpConfigurationsetSecureScheme

Javadoc

Set the URI scheme used for CONFIDENTIAL and INTEGRAL redirections.

Popular methods of HttpConfiguration

  • <init>
    Create a configuration from another.
  • addCustomizer
    Add a Customizer that is invoked for every request received. Customiser are often used to interpret
  • setSecurePort
    Set the TCP/IP port used for CONFIDENTIAL and INTEGRAL redirections.
  • setSendServerVersion
  • setRequestHeaderSize
    Set the maximum size of a request header.Larger headers will allow for more and/or larger cookies pl
  • setOutputBufferSize
    Set the size of the buffer into which response content is aggregated before being sent to the client
  • setResponseHeaderSize
    Set the maximum size of a response header.Larger headers will allow for more and/or larger cookies a
  • setSendDateHeader
  • setSendXPoweredBy
  • getSecurePort
  • getSecureScheme
  • getSendServerVersion
  • getSecureScheme,
  • getSendServerVersion,
  • setHeaderCacheSize,
  • getCustomizers,
  • getOutputBufferSize,
  • getRequestHeaderSize,
  • getCustomizer,
  • getResponseHeaderSize,
  • getSendDateHeader

Popular in Java

  • Making http requests using okhttp
  • runOnUiThread (Activity)
  • getExternalFilesDir (Context)
  • findViewById (Activity)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • JPanel (javax.swing)
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now