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


Java SocketWrapper.setTimeout方法代码示例

本文整理汇总了Java中org.apache.tomcat.util.net.SocketWrapper.setTimeout方法的典型用法代码示例。如果您正苦于以下问题:Java SocketWrapper.setTimeout方法的具体用法?Java SocketWrapper.setTimeout怎么用?Java SocketWrapper.setTimeout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.tomcat.util.net.SocketWrapper的用法示例。


在下文中一共展示了SocketWrapper.setTimeout方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: release

import org.apache.tomcat.util.net.SocketWrapper; //导入方法依赖的package包/类
/**
 * Expected to be used by the handler once the processor is no longer
 * required.
 */
@Override
public void release(SocketWrapper<NioChannel> socket,
        Processor<NioChannel> processor, boolean isSocketClosing,
        boolean addToPoller) {
    processor.recycle(isSocketClosing);
    recycledProcessors.offer(processor);
    if (addToPoller) {
        // The only time this method is called with addToPoller == true
        // is when the socket is in keep-alive so set the appropriate
        // timeout.
        socket.setTimeout(getProtocol().getKeepAliveTimeout());
        socket.getSocket().getPoller().add(socket.getSocket());
    }
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:19,代码来源:AjpNioProtocol.java

示例2: UpgradeNioProcessor

import org.apache.tomcat.util.net.SocketWrapper; //导入方法依赖的package包/类
public UpgradeNioProcessor(SocketWrapper<NioChannel> wrapper,
        UpgradeInbound upgradeInbound, NioSelectorPool pool) {
    super(upgradeInbound);

    wrapper.setTimeout(upgradeInbound.getReadTimeout());

    this.nioChannel = wrapper.getSocket();
    this.pool = pool;
    this.maxRead = nioChannel.getBufHandler().getReadBuffer().capacity();
    this.maxWrite = nioChannel.getBufHandler().getWriteBuffer().capacity();
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:12,代码来源:UpgradeNioProcessor.java

示例3: NioProcessor

import org.apache.tomcat.util.net.SocketWrapper; //导入方法依赖的package包/类
public NioProcessor(SocketWrapper<NioChannel> wrapper,
        HttpUpgradeHandler httpUpgradeProcessor, NioSelectorPool pool,
        int asyncWriteBufferSize) {
    super(httpUpgradeProcessor,
            new NioServletInputStream(wrapper, pool),
            new NioServletOutputStream(wrapper, asyncWriteBufferSize, pool));

    wrapper.setTimeout(INFINITE_TIMEOUT);
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:10,代码来源:NioProcessor.java

示例4: release

import org.apache.tomcat.util.net.SocketWrapper; //导入方法依赖的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<NioChannel> socket,
        Processor<NioChannel> processor, boolean isSocketClosing,
        boolean addToPoller) {
    processor.recycle(isSocketClosing);
    recycledProcessors.offer(processor);
    if (addToPoller) {
        // The only time this method is called with addToPoller == true
        // is when the socket is in keep-alive so set the appropriate
        // timeout.
        socket.setTimeout(getProtocol().getKeepAliveTimeout());
        socket.getSocket().getPoller().add(socket.getSocket());
    }
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:24,代码来源:Http11NioProtocol.java

示例5: release

import org.apache.tomcat.util.net.SocketWrapper; //导入方法依赖的package包/类
/**
 * Expected to be used by the handler once the processor is no longer
 * required.
 */
@Override
public void release(SocketWrapper<NioChannel> socket, Processor<NioChannel> processor, boolean isSocketClosing,
		boolean addToPoller) {
	processor.recycle(isSocketClosing);
	recycledProcessors.offer(processor);
	if (addToPoller) {
		// The only time this method is called with addToPoller == true
		// is when the socket is in keep-alive so set the appropriate
		// timeout.
		socket.setTimeout(getProtocol().getKeepAliveTimeout());
		socket.getSocket().getPoller().add(socket.getSocket());
	}
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:18,代码来源:AjpNioProtocol.java

示例6: UpgradeNioProcessor

import org.apache.tomcat.util.net.SocketWrapper; //导入方法依赖的package包/类
public UpgradeNioProcessor(SocketWrapper<NioChannel> wrapper, UpgradeInbound upgradeInbound, NioSelectorPool pool) {
	super(upgradeInbound);

	wrapper.setTimeout(upgradeInbound.getReadTimeout());

	this.nioChannel = wrapper.getSocket();
	this.pool = pool;
	this.maxRead = nioChannel.getBufHandler().getReadBuffer().capacity();
	this.maxWrite = nioChannel.getBufHandler().getWriteBuffer().capacity();
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:11,代码来源:UpgradeNioProcessor.java

示例7: NioProcessor

import org.apache.tomcat.util.net.SocketWrapper; //导入方法依赖的package包/类
public NioProcessor(SocketWrapper<NioChannel> wrapper, HttpUpgradeHandler httpUpgradeProcessor,
		NioSelectorPool pool, int asyncWriteBufferSize) {
	super(httpUpgradeProcessor, new NioServletInputStream(wrapper, pool),
			new NioServletOutputStream(wrapper, asyncWriteBufferSize, pool));

	wrapper.setTimeout(INFINITE_TIMEOUT);
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:8,代码来源:NioProcessor.java

示例8: release

import org.apache.tomcat.util.net.SocketWrapper; //导入方法依赖的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<NioChannel> socket, Processor<NioChannel> processor, boolean isSocketClosing,
		boolean addToPoller) {
	processor.recycle(isSocketClosing);
	recycledProcessors.offer(processor);
	if (addToPoller) {
		// The only time this method is called with addToPoller == true
		// is when the socket is in keep-alive so set the appropriate
		// timeout.
		socket.setTimeout(getProtocol().getKeepAliveTimeout());
		socket.getSocket().getPoller().add(socket.getSocket());
	}
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:24,代码来源:Http11NioProtocol.java


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