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


Java SocketState.ASYNC_END属性代码示例

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


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

示例1: asyncPostProcess

public synchronized SocketState asyncPostProcess() {
    if (state == AsyncState.COMPLETE_PENDING) {
        doComplete();
        return SocketState.ASYNC_END;
    } else if (state == AsyncState.DISPATCH_PENDING) {
        doDispatch();
        return SocketState.ASYNC_END;
    } else  if (state == AsyncState.STARTING) {
        state = AsyncState.STARTED;
        return SocketState.LONG;
    } else if (state == AsyncState.MUST_COMPLETE) {
        asyncCtxt.fireOnComplete();
        state = AsyncState.DISPATCHED;
        return SocketState.ASYNC_END;
    } else if (state == AsyncState.COMPLETING) {
        asyncCtxt.fireOnComplete();
        state = AsyncState.DISPATCHED;
        return SocketState.ASYNC_END;
    } else if (state == AsyncState.MUST_DISPATCH) {
        state = AsyncState.DISPATCHING;
        return SocketState.ASYNC_END;
    } else if (state == AsyncState.DISPATCHING) {
        state = AsyncState.DISPATCHED;
        return SocketState.ASYNC_END;
    } else if (state == AsyncState.STARTED) {
        // This can occur if an async listener does a dispatch to an async
        // servlet during onTimeout
        return SocketState.LONG;
    } else {
        throw new IllegalStateException(
                sm.getString("asyncStateMachine.invalidAsyncState",
                        "asyncPostProcess()", state));
    }
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:34,代码来源:AsyncStateMachine.java

示例2: asyncPostProcess

public synchronized SocketState asyncPostProcess() {
	if (state == AsyncState.COMPLETE_PENDING) {
		doComplete();
		return SocketState.ASYNC_END;
	} else if (state == AsyncState.DISPATCH_PENDING) {
		doDispatch();
		return SocketState.ASYNC_END;
	} else if (state == AsyncState.STARTING) {
		state = AsyncState.STARTED;
		return SocketState.LONG;
	} else if (state == AsyncState.MUST_COMPLETE) {
		asyncCtxt.fireOnComplete();
		state = AsyncState.DISPATCHED;
		return SocketState.ASYNC_END;
	} else if (state == AsyncState.COMPLETING) {
		asyncCtxt.fireOnComplete();
		state = AsyncState.DISPATCHED;
		return SocketState.ASYNC_END;
	} else if (state == AsyncState.MUST_DISPATCH) {
		state = AsyncState.DISPATCHING;
		return SocketState.ASYNC_END;
	} else if (state == AsyncState.DISPATCHING) {
		state = AsyncState.DISPATCHED;
		return SocketState.ASYNC_END;
	} else if (state == AsyncState.STARTED) {
		// This can occur if an async listener does a dispatch to an async
		// servlet during onTimeout
		return SocketState.LONG;
	} else {
		throw new IllegalStateException(
				sm.getString("asyncStateMachine.invalidAsyncState", "asyncPostProcess()", state));
	}
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:33,代码来源:AsyncStateMachine.java


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