当前位置: 首页>>代码示例>>Java>>正文


Java AbstractProtocol类代码示例

本文整理汇总了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;
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:5,代码来源:Http11AprProtocol.java

示例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);
	}
}
 
开发者ID:Nephilim84,项目名称:contestparser,代码行数:25,代码来源:TomcatEmbeddedServletContainerFactory.java

示例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");
}
 
开发者ID:adohe,项目名称:Bottlenose,代码行数:18,代码来源:TomcatEmbeddedServletContainerFactory.java

示例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);
}
 
开发者ID:nano-projects,项目名称:nano-framework,代码行数:14,代码来源:TomcatCustomServer.java

示例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);
    }
}
 
开发者ID:pidster-dot-org,项目名称:embed-apache-tomcat,代码行数:14,代码来源:TomcatServerRule.java

示例10: getProtocol

import org.apache.coyote.AbstractProtocol; //导入依赖的package包/类
@Override
protected AbstractProtocol<NioChannel> getProtocol() {
    return proto;
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:5,代码来源:AjpNioProtocol.java

示例11: getProtocol

import org.apache.coyote.AbstractProtocol; //导入依赖的package包/类
@Override
protected AbstractProtocol<Socket> getProtocol() {
    return proto;
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:5,代码来源:AjpProtocol.java

示例12: getProtocol

import org.apache.coyote.AbstractProtocol; //导入依赖的package包/类
@Override
protected AbstractProtocol<Long> getProtocol() {
    return proto;
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:5,代码来源:AjpAprProtocol.java

示例13: getProtocol

import org.apache.coyote.AbstractProtocol; //导入依赖的package包/类
@Override
protected AbstractProtocol<NioChannel> getProtocol() {
	return proto;
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:5,代码来源:AjpNioProtocol.java

示例14: getProtocol

import org.apache.coyote.AbstractProtocol; //导入依赖的package包/类
@Override
protected AbstractProtocol<Socket> getProtocol() {
	return proto;
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:5,代码来源:AjpProtocol.java

示例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


注:本文中的org.apache.coyote.AbstractProtocol类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。