本文整理了Java中com.sun.grizzly.tcp.http11.GrizzlyResponse.suspend()
方法的一些代码示例,展示了GrizzlyResponse.suspend()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GrizzlyResponse.suspend()
方法的具体详情如下:
包路径:com.sun.grizzly.tcp.http11.GrizzlyResponse
类名称:GrizzlyResponse
方法名:suspend
[英]Suspend the Response. Suspending a Response will tell the underlying container to avoid recycling objects associated with the current instance, and also to avoid commiting response.
[中]暂停响应。挂起响应将告诉底层容器避免回收与当前实例关联的对象,并避免提交响应。
代码示例来源:origin: com.sun.grizzly/grizzly-utils
/**
* Suspend the {@link Response}. Suspending a {@link Response} will
* tell the underlying container to avoid recycling objects associated with
* the current instance, and also to avoid commiting response.
*/
public void suspend(){
suspend(Long.MAX_VALUE);
}
代码示例来源:origin: com.sun.grizzly/grizzly-http-utils
/**
* Suspend the {@link Response}. Suspending a {@link Response} will
* tell the underlying container to avoid recycling objects associated with
* the current instance, and also to avoid commiting response.
*/
public void suspend(){
suspend(Long.MAX_VALUE);
}
代码示例来源:origin: com.sun.grizzly/grizzly-http-utils
/**
* Suspend the {@link GrizzlyResponse}. Suspending a {@link GrizzlyResponse} will
* tell the underlying container to avoid recycling objects associated with
* the current instance, and also to avoid commiting response.
*
* @param timeout The maximum amount of time, in milliseconds,
* a {@link GrizzlyResponse} can be suspended. When the timeout expires (because
* nothing has been written or because the {@link Response#resume()}
* or {@link GrizzlyResponse#cancel()}), the {@link GrizzlyResponse} will be automatically
* resumed and commited. Usage of any methods of a {@link GrizzlyResponse} that
* times out will throw an {@link IllegalStateException}.
*
*/
public void suspend(long timeout){
suspend(timeout,null,null);
}
代码示例来源:origin: com.sun.grizzly/grizzly-utils
/**
* Suspend the {@link GrizzlyResponse}. Suspending a {@link GrizzlyResponse} will
* tell the underlying container to avoid recycling objects associated with
* the current instance, and also to avoid commiting response.
*
* @param timeout The maximum amount of time, in milliseconds,
* a {@link GrizzlyResponse} can be suspended. When the timeout expires (because
* nothing has been written or because the {@link Response#resume()}
* or {@link GrizzlyResponse#cancel()}), the {@link GrizzlyResponse} will be automatically
* resumed and commited. Usage of any methods of a {@link GrizzlyResponse} that
* times out will throw an {@link IllegalStateException}.
*
*/
public void suspend(long timeout){
suspend(timeout,null,null);
}
内容来源于网络,如有侵权,请联系作者删除!