本文整理汇总了Java中org.apache.coyote.AbstractProtocol类的典型用法代码示例。如果您正苦于以下问题:Java AbstractProtocol类的具体用法?Java AbstractProtocol怎么用?Java AbstractProtocol使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AbstractProtocol类属于org.apache.coyote包,在下文中一共展示了AbstractProtocol类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getProtocol
import org.apache.coyote.AbstractProtocol; //导入依赖的package包/类
@Override
protected AbstractProtocol<Long> getProtocol() {
return proto;
}
示例2: customizeConnector
import org.apache.coyote.AbstractProtocol; //导入依赖的package包/类
protected void customizeConnector(Connector connector) {
int port = (getPort() >= 0 ? getPort() : 0);
connector.setPort(port);
if (connector.getProtocolHandler() instanceof AbstractProtocol) {
customizeProtocol((AbstractProtocol<?>) connector.getProtocolHandler());
}
if (getUriEncoding() != null) {
connector.setURIEncoding(getUriEncoding().name());
}
// If ApplicationContext is slow to start we want Tomcat not to bind to the socket
// prematurely...
connector.setProperty("bindOnInit", "false");
if (getSsl() != null && getSsl().isEnabled()) {
customizeSsl(connector);
}
if (getCompression() != null && getCompression().getEnabled()) {
customizeCompression(connector);
}
for (TomcatConnectorCustomizer customizer : this.tomcatConnectorCustomizers) {
customizer.customize(connector);
}
}
示例3: customizeConnector
import org.apache.coyote.AbstractProtocol; //导入依赖的package包/类
protected void customizeConnector(Connector connector) {
int port = (getPort() >= 0 ? getPort() : 0);
connector.setPort(port);
if (connector.getProtocolHandler() instanceof AbstractProtocol) {
if (getAddress() != null) {
((AbstractProtocol<?>) connector.getProtocolHandler())
.setAddress(getAddress());
}
}
if (getUriEncoding() != null) {
connector.setURIEncoding(getUriEncoding());
}
// If ApplicationContext is slow to start we want Tomcat not to bind to the socket
// prematurely...
connector.setProperty("bindOnInit", "false");
}
示例4: customizeConnector
import org.apache.coyote.AbstractProtocol; //导入依赖的package包/类
protected void customizeConnector(Connector connector) {
int port = (getPort() >= 0 ? getPort() : 0);
connector.setPort(port);
if (StringUtils.hasText(this.getServerHeader())) {
connector.setAttribute("server", this.getServerHeader());
}
if (connector.getProtocolHandler() instanceof AbstractProtocol) {
customizeProtocol((AbstractProtocol<?>) connector.getProtocolHandler());
}
if (getUriEncoding() != null) {
connector.setURIEncoding(getUriEncoding().name());
}
// If ApplicationContext is slow to start we want Tomcat not to bind to the socket
// prematurely...
connector.setProperty("bindOnInit", "false");
if (getSsl() != null && getSsl().isEnabled()) {
customizeSsl(connector);
}
if (getCompression() != null && getCompression().getEnabled()) {
customizeCompression(connector);
}
for (TomcatConnectorCustomizer customizer : this.tomcatConnectorCustomizers) {
customizer.customize(connector);
}
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:28,代码来源:TomcatEmbeddedServletContainerFactory.java
示例5: customizeConnectionTimeout
import org.apache.coyote.AbstractProtocol; //导入依赖的package包/类
private void customizeConnectionTimeout(
TomcatEmbeddedServletContainerFactory factory, int connectionTimeout) {
for (Connector connector : factory.getAdditionalTomcatConnectors()) {
if (connector.getProtocolHandler() instanceof AbstractProtocol) {
AbstractProtocol<?> handler = (AbstractProtocol<?>) connector
.getProtocolHandler();
handler.setConnectionTimeout(connectionTimeout);
}
}
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:11,代码来源:ServerProperties.java
示例6: customizeMaxThreads
import org.apache.coyote.AbstractProtocol; //导入依赖的package包/类
@SuppressWarnings("rawtypes")
private void customizeMaxThreads(TomcatEmbeddedServletContainerFactory factory) {
factory.addConnectorCustomizers(new TomcatConnectorCustomizer() {
@Override
public void customize(Connector connector) {
ProtocolHandler handler = connector.getProtocolHandler();
if (handler instanceof AbstractProtocol) {
AbstractProtocol protocol = (AbstractProtocol) handler;
protocol.setMaxThreads(Tomcat.this.maxThreads);
}
}
});
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:16,代码来源:ServerProperties.java
示例7: customizeMinThreads
import org.apache.coyote.AbstractProtocol; //导入依赖的package包/类
@SuppressWarnings("rawtypes")
private void customizeMinThreads(TomcatEmbeddedServletContainerFactory factory) {
factory.addConnectorCustomizers(new TomcatConnectorCustomizer() {
@Override
public void customize(Connector connector) {
ProtocolHandler handler = connector.getProtocolHandler();
if (handler instanceof AbstractProtocol) {
AbstractProtocol protocol = (AbstractProtocol) handler;
protocol.setMinSpareThreads(Tomcat.this.minSpareThreads);
}
}
});
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:16,代码来源:ServerProperties.java
示例8: initConnector
import org.apache.coyote.AbstractProtocol; //导入依赖的package包/类
@SuppressWarnings("rawtypes")
protected void initConnector() {
final TypeReference<ConnectorConf> type = new TypeReference<ConnectorConf>() {
};
final ConnectorConf conf = new ConnectorConf(JSON.parseObject(context.getProperty(TOMCAT_CONNECTOR), type));
LOGGER.debug("{}", conf.toString());
final Connector connector = conf.init();
final Service service = getService();
final Executor executor = service.getExecutor(conf.getExecutor());
((AbstractProtocol) connector.getProtocolHandler()).setExecutor(executor);
setConnector(connector);
service.addConnector(connector);
}
示例9: getPort
import org.apache.coyote.AbstractProtocol; //导入依赖的package包/类
/**
* @return port
*/
public int getPort() {
try {
Service service = runtime.getServer().findServices()[0];
Connector connector = service.findConnectors()[0];
AbstractProtocol<?> abstractProtocol = (AbstractProtocol<?>) connector.getProtocolHandler();
return abstractProtocol.getLocalPort();
} catch (Exception e) {
throw new IllegalStateException("Listening port value was not retrievable", e);
}
}
示例10: getProtocol
import org.apache.coyote.AbstractProtocol; //导入依赖的package包/类
@Override
protected AbstractProtocol<NioChannel> getProtocol() {
return proto;
}
示例11: getProtocol
import org.apache.coyote.AbstractProtocol; //导入依赖的package包/类
@Override
protected AbstractProtocol<Socket> getProtocol() {
return proto;
}
示例12: getProtocol
import org.apache.coyote.AbstractProtocol; //导入依赖的package包/类
@Override
protected AbstractProtocol<Long> getProtocol() {
return proto;
}
示例13: getProtocol
import org.apache.coyote.AbstractProtocol; //导入依赖的package包/类
@Override
protected AbstractProtocol<NioChannel> getProtocol() {
return proto;
}
示例14: getProtocol
import org.apache.coyote.AbstractProtocol; //导入依赖的package包/类
@Override
protected AbstractProtocol<Socket> getProtocol() {
return proto;
}
示例15: customizeProtocol
import org.apache.coyote.AbstractProtocol; //导入依赖的package包/类
private void customizeProtocol(AbstractProtocol<?> protocol) {
if (getAddress() != null) {
protocol.setAddress(getAddress());
}
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:6,代码来源:TomcatEmbeddedServletContainerFactory.java