本文整理了Java中org.eclipse.jetty.client.HttpClient.getTimeout()
方法的一些代码示例,展示了HttpClient.getTimeout()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpClient.getTimeout()
方法的具体详情如下:
包路径:org.eclipse.jetty.client.HttpClient
类名称:HttpClient
方法名:getTimeout
暂无
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
/**
* @return the period in ms that an exchange will wait for a response from the server.
* @deprecated use {@link #getTimeout()} instead.
*/
@Deprecated
public int getSoTimeout()
{
return Long.valueOf(getTimeout()).intValue();
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
private void adjustIdleTimeout() throws IOException
{
// Adjusts the idle timeout in case the default or exchange timeout
// are greater. This is needed for long polls, where one wants an
// aggressive releasing of idle connections (so idle timeout is small)
// but still allow long polls to complete normally
long timeout = _exchange.getTimeout();
if (timeout <= 0)
timeout = _destination.getHttpClient().getTimeout();
long endPointTimeout = _endp.getMaxIdleTime();
if (timeout > 0 && timeout > endPointTimeout)
{
// Make it larger than the exchange timeout so that there are
// no races between the idle timeout and the exchange timeout
// when trying to close the endpoint
_endp.setMaxIdleTime(2 * (int)timeout);
}
}
代码示例来源:origin: timurstrekalov/saga
long ctimeout = (_client.getTimeout() > exchange.getTimeout()) ? _client.getTimeout() : exchange.getTimeout();
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
long ctimeout = (_client.getTimeout() > exchange.getTimeout()) ? _client.getTimeout() : exchange.getTimeout();
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
long ctimeout = (_client.getTimeout() > exchange.getTimeout())?_client.getTimeout():exchange.getTimeout();
exchange.setTimeout(ctimeout);
代码示例来源:origin: org.apache.camel/camel-jetty8
exchange.setException(new ExchangeTimedOutException(exchange, client.getTimeout()));
} else {
内容来源于网络,如有侵权,请联系作者删除!