本文整理汇总了Java中org.apache.coyote.Processor类的典型用法代码示例。如果您正苦于以下问题:Java Processor类的具体用法?Java Processor怎么用?Java Processor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Processor类属于org.apache.coyote包,在下文中一共展示了Processor类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: release
import org.apache.coyote.Processor; //导入依赖的package包/类
/**
* Expected to be used by the Poller to release resources on socket
* close, errors etc.
*/
@Override
public void release(SocketChannel socket) {
if (log.isDebugEnabled())
log.debug("Iterating through our connections to release a socket channel:"+socket);
boolean released = false;
Iterator<java.util.Map.Entry<NioChannel, Processor<NioChannel>>> it = connections.entrySet().iterator();
while (it.hasNext()) {
java.util.Map.Entry<NioChannel, Processor<NioChannel>> entry = it.next();
if (entry.getKey().getIOChannel()==socket) {
it.remove();
Processor<NioChannel> result = entry.getValue();
result.recycle(true);
unregister(result);
released = true;
break;
}
}
if (log.isDebugEnabled())
log.debug("Done iterating through our connections to release a socket channel:"+socket +" released:"+released);
}
开发者ID:liaokailin,项目名称:tomcat7,代码行数:25,代码来源:AjpNioProtocol.java
示例2: release
import org.apache.coyote.Processor; //导入依赖的package包/类
/**
* Expected to be used by the Poller to release resources on socket
* close, errors etc.
*/
@Override
public void release(SocketChannel socket) {
if (log.isDebugEnabled())
log.debug("Iterating through our connections to release a socket channel:"+socket);
boolean released = false;
Iterator<java.util.Map.Entry<NioChannel, Processor<NioChannel>>> it = connections.entrySet().iterator();
while (it.hasNext()) {
java.util.Map.Entry<NioChannel, Processor<NioChannel>> entry = it.next();
if (entry.getKey().getIOChannel()==socket) {
it.remove();
Processor<NioChannel> result = entry.getValue();
result.recycle(true);
unregister(result);
released = true;
break;
}
}
if (log.isDebugEnabled())
log.debug("Done iterating through our connections to release a socket channel:"+socket +" released:"+released);
}
开发者ID:liaokailin,项目名称:tomcat7,代码行数:25,代码来源:Http11NioProtocol.java
示例3: createUpgradeProcessor
import org.apache.coyote.Processor; //导入依赖的package包/类
@Override
protected Processor<Long> createUpgradeProcessor(
SocketWrapper<Long> socket,
HttpUpgradeHandler httpUpgradeProcessor)
throws IOException {
return new AprProcessor(socket, httpUpgradeProcessor,
(AprEndpoint) proto.endpoint,
proto.getUpgradeAsyncWriteBufferSize());
}
开发者ID:liaokailin,项目名称:tomcat7,代码行数:10,代码来源:Http11AprProtocol.java
示例4: release
import org.apache.coyote.Processor; //导入依赖的package包/类
/**
* Expected to be used by the Poller to release resources on socket
* close, errors etc.
*/
@Override
public void release(SocketChannel socket) {
if (log.isDebugEnabled())
log.debug("Iterating through our connections to release a socket channel:" + socket);
boolean released = false;
Iterator<java.util.Map.Entry<NioChannel, Processor<NioChannel>>> it = connections.entrySet().iterator();
while (it.hasNext()) {
java.util.Map.Entry<NioChannel, Processor<NioChannel>> entry = it.next();
if (entry.getKey().getIOChannel() == socket) {
it.remove();
Processor<NioChannel> result = entry.getValue();
result.recycle(true);
unregister(result);
released = true;
break;
}
}
if (log.isDebugEnabled())
log.debug("Done iterating through our connections to release a socket channel:" + socket + " released:"
+ released);
}
开发者ID:how2j,项目名称:lazycat,代码行数:26,代码来源:AjpNioProtocol.java
示例5: longPoll
import org.apache.coyote.Processor; //导入依赖的package包/类
@SuppressWarnings("deprecation") // Inbound/Outbound based upgrade
@Override
protected void longPoll(SocketWrapper<Long> socket,
Processor<Long> processor) {
if (processor.isAsync()) {
// Async
socket.setAsync(true);
} else if (processor.isComet()) {
// Comet
if (proto.endpoint.isRunning()) {
socket.setComet(true);
((AprEndpoint) proto.endpoint).getPoller().add(
socket.getSocket().longValue(),
proto.endpoint.getSoTimeout(), true, false);
} else {
// Process a STOP directly
((AprEndpoint) proto.endpoint).processSocket(
socket.getSocket().longValue(),
SocketStatus.STOP);
}
} else if (processor.isUpgrade()) {
// Upgraded
Poller p = ((AprEndpoint) proto.endpoint).getPoller();
if (p == null) {
// Connector has been stopped
release(socket, processor, true, false);
} else {
p.add(socket.getSocket().longValue(), -1, true, false);
}
} else {
// Tomcat 7 proprietary upgrade
((AprEndpoint) proto.endpoint).getPoller().add(
socket.getSocket().longValue(),
processor.getUpgradeInbound().getReadTimeout(),
true, false);
}
}
开发者ID:sdw2330976,项目名称:apache-tomcat-7.0.57,代码行数:39,代码来源:Http11AprProtocol.java
示例6: release
import org.apache.coyote.Processor; //导入依赖的package包/类
/**
* Expected to be used by the handler once the processor is no longer
* required.
*/
@Override
public void release(SocketWrapper<Long> socket,
Processor<Long> processor, boolean isSocketClosing,
boolean addToPoller) {
processor.recycle(isSocketClosing);
recycledProcessors.offer(processor);
if (addToPoller) {
((AprEndpoint)proto.endpoint).getPoller().add(
socket.getSocket().longValue(),
proto.endpoint.getKeepAliveTimeout(),
true, false);
}
}
开发者ID:liaokailin,项目名称:tomcat7,代码行数:18,代码来源:AjpAprProtocol.java
示例7: initSsl
import org.apache.coyote.Processor; //导入依赖的package包/类
@Override
protected void initSsl(SocketWrapper<Socket> socket,
Processor<Socket> processor) {
if (proto.isSSLEnabled() && (proto.sslImplementation != null)) {
processor.setSslSupport(
proto.sslImplementation.getSSLSupport(
socket.getSocket()));
} else {
processor.setSslSupport(null);
}
}
开发者ID:liaokailin,项目名称:tomcat7,代码行数:13,代码来源:Http11Protocol.java
示例8: createUpgradeProcessor
import org.apache.coyote.Processor; //导入依赖的package包/类
/**
* @deprecated Will be removed in Tomcat 8.0.x.
*/
@Deprecated
@Override
protected Processor<Socket> createUpgradeProcessor(
SocketWrapper<Socket> socket,
org.apache.coyote.http11.upgrade.UpgradeInbound inbound)
throws IOException {
return new org.apache.coyote.http11.upgrade.UpgradeBioProcessor(
socket, inbound);
}
开发者ID:liaokailin,项目名称:tomcat7,代码行数:13,代码来源:Http11Protocol.java
示例9: initSsl
import org.apache.coyote.Processor; //导入依赖的package包/类
@Override
protected void initSsl(SocketWrapper<NioChannel> socket,
Processor<NioChannel> processor) {
if (proto.isSSLEnabled() &&
(proto.sslImplementation != null)
&& (socket.getSocket() instanceof SecureNioChannel)) {
SecureNioChannel ch = (SecureNioChannel)socket.getSocket();
processor.setSslSupport(
proto.sslImplementation.getSSLSupport(
ch.getSslEngine().getSession()));
} else {
processor.setSslSupport(null);
}
}
开发者ID:liaokailin,项目名称:tomcat7,代码行数:16,代码来源:Http11NioProtocol.java
示例10: longPoll
import org.apache.coyote.Processor; //导入依赖的package包/类
@Override
protected void longPoll(SocketWrapper<NioChannel> socket,
Processor<NioChannel> processor) {
if (processor.isAsync()) {
socket.setAsync(true);
} else {
// Either:
// - this is comet request
// - this is an upgraded connection
// - the request line/headers have not been completely
// read
socket.getSocket().getPoller().add(socket.getSocket());
}
}
开发者ID:liaokailin,项目名称:tomcat7,代码行数:16,代码来源:Http11NioProtocol.java
示例11: createUpgradeProcessor
import org.apache.coyote.Processor; //导入依赖的package包/类
/**
* @deprecated Will be removed in Tomcat 8.0.x.
*/
@Deprecated
@Override
protected Processor<NioChannel> createUpgradeProcessor(
SocketWrapper<NioChannel> socket,
org.apache.coyote.http11.upgrade.UpgradeInbound inbound)
throws IOException {
return new org.apache.coyote.http11.upgrade.UpgradeNioProcessor(
socket, inbound,
((Http11NioProtocol) getProtocol()).getEndpoint().getSelectorPool());
}
开发者ID:liaokailin,项目名称:tomcat7,代码行数:14,代码来源:Http11NioProtocol.java
示例12: release
import org.apache.coyote.Processor; //导入依赖的package包/类
/**
* Expected to be used by the handler once the processor is no longer
* required.
*
* @param socket
* @param processor
* @param isSocketClosing Not used in HTTP
* @param addToPoller
*/
@Override
public void release(SocketWrapper<Long> socket,
Processor<Long> processor, boolean isSocketClosing,
boolean addToPoller) {
processor.recycle(isSocketClosing);
recycledProcessors.offer(processor);
if (addToPoller && proto.endpoint.isRunning()) {
((AprEndpoint)proto.endpoint).getPoller().add(
socket.getSocket().longValue(),
proto.endpoint.getKeepAliveTimeout(), true, false);
}
}
开发者ID:liaokailin,项目名称:tomcat7,代码行数:22,代码来源:Http11AprProtocol.java
注:本文中的org.apache.coyote.Processor类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论