org.apache.catalina.startup.Embedded.addConnector()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(169)

本文整理了Java中org.apache.catalina.startup.Embedded.addConnector()方法的一些代码示例,展示了Embedded.addConnector()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Embedded.addConnector()方法的具体详情如下:
包路径:org.apache.catalina.startup.Embedded
类名称:Embedded
方法名:addConnector

Embedded.addConnector介绍

[英]Add a new Connector to the set of defined Connectors. The newly added Connector will be associated with the most recently added Engine.
[中]将新连接器添加到已定义的连接器集中。新添加的连接器将与最近添加的引擎相关联。

代码示例

代码示例来源:origin: stackoverflow.com

container.addConnector(httpConnector);

代码示例来源:origin: apache/geode

container.addConnector(httpConnector);
container.setAwait(true);

代码示例来源:origin: net.disy.legato/legato-testing

public TomcatWebServerEnvironment(final String catalinaHome, final int port) {
 container = new Embedded();
 container.setCatalinaHome(catalinaHome);
 //container.setRealm(new MemoryRealm());
 localHost = container.createHost("localHost", new File(".").getAbsolutePath());
 final Engine engine = container.createEngine();
 engine.setName("localEngine");
 engine.addChild(localHost);
 engine.setDefaultHost(localHost.getName());
 container.addEngine(engine);
 final Connector httpConnector = container.createConnector((InetAddress) null, port, false);
 container.addConnector(httpConnector);
 container.setAwait(true);
 webAppLoader = new WebappLoader(this.getClass().getClassLoader());
 if (classesDir != null) {
  try {
   webAppLoader.addRepository(new File(classesDir).toURI().toURL().toString());
  }
  catch (final MalformedURLException e) {
   e.printStackTrace();
  }
 }
}

代码示例来源:origin: org.apache.tapestry/tapestry-runner

tomcatServer.addConnector(http);
  https.setProperty("keystore", keystoreFile.getPath());
  https.setProperty("keypass", "tapestry");
  tomcatServer.addConnector(https);

代码示例来源:origin: org.testatoo.container/testatoo-container-tomcat

server.addConnector(server.createConnector((InetAddress) null, port(), false));

代码示例来源:origin: apache/tomcat-maven-plugin

container.addConnector( httpConnector );
  container.addConnector( httpsConnector );
  container.addConnector( ajpConnector );

相关文章