use of org.apache.catalina.connector.Connector in project sonarqube by SonarSource.
the class StartupLogsTest method newConnector.
private Connector newConnector(String protocol, String schema) {
Connector httpConnector = new Connector(protocol);
httpConnector.setScheme(schema);
httpConnector.setPort(1234);
return httpConnector;
}
use of org.apache.catalina.connector.Connector in project sonarqube by SonarSource.
the class TomcatConnectorsTest method test_max_post_size_for_http_connection.
@Test
public void test_max_post_size_for_http_connection() throws Exception {
Properties properties = new Properties();
Props props = new Props(properties);
TomcatConnectors.configure(tomcat, props);
verify(tomcat.getService()).addConnector(argThat(new ArgumentMatcher<Connector>() {
@Override
public boolean matches(Object o) {
Connector c = (Connector) o;
return c.getMaxPostSize() == -1;
}
}));
}
use of org.apache.catalina.connector.Connector in project sonarqube by SonarSource.
the class TomcatConnectorsTest method bind_to_specific_address.
@Test
public void bind_to_specific_address() {
Properties p = new Properties();
p.setProperty("sonar.web.port", "9000");
p.setProperty("sonar.web.host", "1.2.3.4");
TomcatConnectors.configure(tomcat, new Props(p));
verify(tomcat.getService()).addConnector(argThat(new ArgumentMatcher<Connector>() {
@Override
public boolean matches(Object o) {
Connector c = (Connector) o;
return c.getScheme().equals("http") && c.getPort() == 9000 && ((InetAddress) c.getProperty("address")).getHostAddress().equals("1.2.3.4");
}
}));
}
use of org.apache.catalina.connector.Connector in project spring-boot by spring-projects.
the class SampleTomcatTwoConnectorsApplication method createStandardConnector.
private Connector createStandardConnector() {
Connector connector = new Connector("org.apache.coyote.http11.Http11NioProtocol");
connector.setPort(port());
return connector;
}
use of org.apache.catalina.connector.Connector in project spring-boot by spring-projects.
the class TomcatReactiveWebServerFactory method createTomcatServer.
private Tomcat createTomcatServer() {
Tomcat tomcat = new Tomcat();
File baseDir = createTempDir("tomcat");
tomcat.setBaseDir(baseDir.getAbsolutePath());
Connector connector = new Connector(this.protocol);
tomcat.getService().addConnector(connector);
customizeConnector(connector);
tomcat.setConnector(connector);
tomcat.getHost().setAutoDeploy(false);
return tomcat;
}
Aggregations