Tabnine Logo
org.apache.coyote.http11
Code IndexAdd Tabnine to your IDE (free)

How to use org.apache.coyote.http11

Best Java code snippets using org.apache.coyote.http11 (Showing top 20 results out of 315)

origin: org.springframework.boot/spring-boot

private void configureSslClientAuth(AbstractHttp11JsseProtocol<?> protocol, Ssl ssl) {
  if (ssl.getClientAuth() == Ssl.ClientAuth.NEED) {
    protocol.setClientAuth(Boolean.TRUE.toString());
  }
  else if (ssl.getClientAuth() == Ssl.ClientAuth.WANT) {
    protocol.setClientAuth("want");
  }
}
origin: org.springframework.boot/spring-boot

private void customize(AbstractHttp11Protocol<?> protocol) {
  Compression compression = this.compression;
  protocol.setCompression("on");
  protocol.setCompressionMinSize(getMinResponseSize(compression));
  protocol.setCompressibleMimeType(getMimeTypes(compression));
  if (this.compression.getExcludedUserAgents() != null) {
    protocol.setNoCompressionUserAgents(getExcludedUserAgents());
  }
}
origin: ityouknow/spring-boot-examples

@Bean
public TomcatEmbeddedServletContainerFactory tomcatEmbedded() {
  TomcatEmbeddedServletContainerFactory tomcat = new TomcatEmbeddedServletContainerFactory();
  tomcat.addConnectorCustomizers((TomcatConnectorCustomizer) connector -> {
    if ((connector.getProtocolHandler() instanceof AbstractHttp11Protocol<?>)) {
      //-1 means unlimited
      ((AbstractHttp11Protocol<?>) connector.getProtocolHandler()).setMaxSwallowSize(-1);
    }
  });
  return tomcat;
}
origin: org.apache.coyote.springsource/com.springsource.org.apache.coyote.springsource

public Http11NioProtocol() {
  cHandler = new Http11ConnectionHandler( this );
  setSoLinger(Constants.DEFAULT_CONNECTION_LINGER);
  setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
  //setServerSoTimeout(Constants.DEFAULT_SERVER_SOCKET_TIMEOUT);
  setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY);
}
origin: org.springframework.boot/spring-boot

protocol.setSSLEnabled(true);
protocol.setSslProtocol(ssl.getProtocol());
configureSslClientAuth(protocol, ssl);
protocol.setKeystorePass(ssl.getKeyStorePassword());
protocol.setKeyPass(ssl.getKeyPassword());
protocol.setKeyAlias(ssl.getKeyAlias());
String ciphers = StringUtils.arrayToCommaDelimitedString(ssl.getCiphers());
if (StringUtils.hasText(ciphers)) {
  protocol.setCiphers(ciphers);
  for (SSLHostConfig sslHostConfig : protocol.findSslHostConfigs()) {
    sslHostConfig.setProtocols(StringUtils
        .arrayToCommaDelimitedString(ssl.getEnabledProtocols()));
origin: org.springframework.boot/spring-boot

private void configureSslTrustStore(AbstractHttp11JsseProtocol<?> protocol, Ssl ssl) {
  if (ssl.getTrustStore() != null) {
    try {
      protocol.setTruststoreFile(
          ResourceUtils.getURL(ssl.getTrustStore()).toString());
    }
    catch (FileNotFoundException ex) {
      throw new WebServerException(
          "Could not load trust store: " + ex.getMessage(), ex);
    }
  }
  protocol.setTruststorePass(ssl.getTrustStorePassword());
  if (ssl.getTrustStoreType() != null) {
    protocol.setTruststoreType(ssl.getTrustStoreType());
  }
  if (ssl.getTrustStoreProvider() != null) {
    protocol.setTruststoreProvider(ssl.getTrustStoreProvider());
  }
}
origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

@Override
public void end() throws IOException {
  if (responseFinished) {
    return;
  }
  if (lastActiveFilter == -1) {
    outputStreamOutputBuffer.end();
  } else {
    activeFilters[lastActiveFilter].end();
  }
  responseFinished = true;
}
origin: org.springframework.boot/spring-boot

protected void configureSslStoreProvider(AbstractHttp11JsseProtocol<?> protocol,
    SslStoreProvider sslStoreProvider) {
  Assert.isInstanceOf(Http11NioProtocol.class, protocol,
      "SslStoreProvider can only be used with Http11NioProtocol");
  TomcatURLStreamHandlerFactory instance = TomcatURLStreamHandlerFactory
      .getInstance();
  instance.addUserFactory(
      new SslStoreProviderUrlStreamHandlerFactory(sslStoreProvider));
  try {
    if (sslStoreProvider.getKeyStore() != null) {
      protocol.setKeystorePass("");
      protocol.setKeystoreFile(
          SslStoreProviderUrlStreamHandlerFactory.KEY_STORE_URL);
    }
    if (sslStoreProvider.getTrustStore() != null) {
      protocol.setTruststorePass("");
      protocol.setTruststoreFile(
          SslStoreProviderUrlStreamHandlerFactory.TRUST_STORE_URL);
    }
  }
  catch (Exception ex) {
    throw new WebServerException("Could not load store: " + ex.getMessage(), ex);
  }
}
origin: jboss.web/jbossweb

public void recycle() {
  inputBuffer.recycle();
  outputBuffer.recycle();
  this.socket = null;
  sslSupport = null;
  timeout = -1;
  resumeNotification = false;
  eventProcessing = true;
}
origin: stackoverflow.com

 @Bean
public EmbeddedServletContainerCustomizer servletContainerCustomizer() {
  return new EmbeddedServletContainerCustomizer() {
    @Override
    public void customize(ConfigurableEmbeddedServletContainer servletContainer) {
      ((TomcatEmbeddedServletContainerFactory) servletContainer).addConnectorCustomizers(
          new TomcatConnectorCustomizer() {
            @Override
            public void customize(Connector connector) {
              AbstractHttp11Protocol httpProtocol = (AbstractHttp11Protocol) connector.getProtocolHandler();
              httpProtocol.setCompression("on");
              httpProtocol.setCompressionMinSize(256);
              String mimeTypes = httpProtocol.getCompressableMimeTypes();
              String mimeTypesWithJson = mimeTypes + "," + MediaType.APPLICATION_JSON_VALUE;
              httpProtocol.setCompressableMimeTypes(mimeTypesWithJson);
            }
          }
      );
    }
  };
}
origin: org.springframework.boot/spring-boot

private void configureSslKeyStore(AbstractHttp11JsseProtocol<?> protocol, Ssl ssl) {
  try {
    protocol.setKeystoreFile(ResourceUtils.getURL(ssl.getKeyStore()).toString());
  }
  catch (FileNotFoundException ex) {
    throw new WebServerException("Could not load key store: " + ex.getMessage(),
        ex);
  }
  if (ssl.getKeyStoreType() != null) {
    protocol.setKeystoreType(ssl.getKeyStoreType());
  }
  if (ssl.getKeyStoreProvider() != null) {
    protocol.setKeystoreProvider(ssl.getKeyStoreProvider());
  }
}
origin: codefollower/Tomcat-Research

@Override
public void start() throws Exception {
  super.start();
  if (npnHandler != null) {
    npnHandler.init(getEndpoint(), 0, getAdapter());
  }
}
origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

@Override
public long getBytesWritten() {
  if (lastActiveFilter == -1) {
    return outputStreamOutputBuffer.getBytesWritten();
  } else {
    return activeFilters[lastActiveFilter].getBytesWritten();
  }
}
origin: org.jboss.web/jbossweb

public void recycle() {
  inputBuffer.recycle();
  outputBuffer.recycle();
  this.channel = null;
  super.recycle();
}
origin: codefollower/Tomcat-Research

  /**
   * Set the socket buffer flag.
   */
  @Override
  public void setSocketBuffer(int socketBuffer) {
    super.setSocketBuffer(socketBuffer);
    outputBuffer.setSocketBuffer(socketBuffer);
  }
}
origin: codefollower/Tomcat-Research

@Override
public void start() throws Exception {
  super.start();
  if (npnHandler != null) {
    npnHandler.init(endpoint, 0, getAdapter());
  }
}
origin: psi-probe/psi-probe

/**
 * Instantiates a new SSL host config helper.
 *
 * @param protocol the protocol
 * @param info the info
 * @throws IllegalAccessException the illegal access exception
 * @throws InvocationTargetException the invocation target exception
 */
public SslHostConfigHelper(AbstractHttp11JsseProtocol<?> protocol, ConnectorInfo info)
  throws IllegalAccessException, InvocationTargetException {
 SSLHostConfig[] sslHostConfigs = protocol.findSslHostConfigs();
 List<SslHostConfigInfo> sslHostConfigInfos = new ArrayList<>(sslHostConfigs.length);
 info.setSslHostConfigInfos(sslHostConfigInfos);
 for (SSLHostConfig sslHostConfig : sslHostConfigs) {
  sslHostConfigInfos.add(toSslHostConfigInfo(sslHostConfig));
 }
}
origin: org.jboss.web/jbossweb

/**
 * 
 * @param channel
 */
private void setChannel(NioChannel channel) {
  // Setting up the channel
  this.channel = channel;
  this.inputBuffer.setChannel(channel);
  this.outputBuffer.setChannel(channel);
}
origin: psi-probe/psi-probe

/**
 * Gets the connector infos.
 *
 * @param connectors the connectors
 * @return the connector infos
 * @throws IllegalAccessException the illegal access exception
 * @throws InvocationTargetException the invocation target exception
 */
private List<ConnectorInfo> getConnectorInfos(List<Connector> connectors)
  throws IllegalAccessException, InvocationTargetException {
 List<ConnectorInfo> infos = new ArrayList<>();
 for (Connector connector : connectors) {
  if (!connector.getSecure()) {
   continue;
  }
  ProtocolHandler protocolHandler = connector.getProtocolHandler();
  if (protocolHandler instanceof AbstractHttp11JsseProtocol) {
   AbstractHttp11JsseProtocol<?> protocol = (AbstractHttp11JsseProtocol<?>) protocolHandler;
   if (!protocol.getSecure()) {
    continue;
   }
   infos.add(toConnectorInfo(protocol));
  }
 }
 return infos;
}
origin: psi-probe/psi-probe

 throws IllegalAccessException, InvocationTargetException {
ConnectorInfo info = new ConnectorInfo();
info.setName(ObjectName.unquote(protocol.getName()));
org.apache.coyote.http11

Most used classes

  • Http11NioProtocol
    Abstract the protocol implementation, including threading, etc. Processor is single threaded and spe
  • AbstractHttp11Protocol
  • Http11AprProtocol
    Abstract the protocol implementation, including threading, etc. Processor is single threaded and spe
  • Http11Protocol
    Abstract the protocol implementation, including threading, etc. Processor is single threaded and spe
  • InputFilter
    Input filter interface.
  • ChunkedInputFilter,
  • ChunkedOutputFilter,
  • GzipOutputFilter,
  • IdentityInputFilter,
  • IdentityOutputFilter,
  • VoidInputFilter,
  • VoidOutputFilter,
  • Http11Processor,
  • InternalInputBuffer,
  • InternalOutputBuffer,
  • OutputFilter,
  • SavedRequestInputFilter,
  • AbstractHttp11JsseProtocol,
  • Http11AprProcessor
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