本文整理了Java中org.eclipse.jetty.client.HttpClient.getIdleTimeout()
方法的一些代码示例,展示了HttpClient.getIdleTimeout()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpClient.getIdleTimeout()
方法的具体详情如下:
包路径:org.eclipse.jetty.client.HttpClient
类名称:HttpClient
方法名:getIdleTimeout
暂无
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
@Override
protected EndPoint newEndPoint(SocketChannel channel, ManagedSelector selector, SelectionKey key)
{
return new SelectChannelEndPoint(channel, selector, key, getScheduler(), getIdleTimeout());
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
@Override
protected EndPoint newEndPoint(SocketChannel channel, ManagedSelector selector, SelectionKey key)
{
return new SelectChannelEndPoint(channel, selector, key, getScheduler(), getIdleTimeout());
}
代码示例来源:origin: org.eclipse.jetty/jetty-client
@Override
protected EndPoint newEndPoint(SelectableChannel channel, ManagedSelector selector, SelectionKey key)
{
SocketChannelEndPoint endp = new SocketChannelEndPoint(channel, selector, key, getScheduler());
endp.setIdleTimeout(client.getIdleTimeout());
return endp;
}
代码示例来源:origin: org.eclipse.jetty/jetty-unixsocket
@Override
protected EndPoint newEndPoint(SelectableChannel channel, ManagedSelector selector, SelectionKey key)
{
UnixSocketEndPoint endp = new UnixSocketEndPoint((UnixSocketChannel)channel, selector, key, getScheduler());
endp.setIdleTimeout(getHttpClient().getIdleTimeout());
return endp;
}
}
代码示例来源:origin: org.cometd.java/cometd-java-client
@Override
public void init() {
super.init();
_aborted = false;
long defaultMaxNetworkDelay = _httpClient.getIdleTimeout();
if (defaultMaxNetworkDelay <= 0) {
defaultMaxNetworkDelay = 10000;
}
setMaxNetworkDelay(defaultMaxNetworkDelay);
_maxMessageSize = getOption(MAX_MESSAGE_SIZE_OPTION, 1024 * 1024);
Pattern uriRegexp = Pattern.compile("(^https?://(((\\[[^\\]]+\\])|([^:/\\?#]+))(:(\\d+))?))?([^\\?#]*)(.*)?");
Matcher uriMatcher = uriRegexp.matcher(getURL());
if (uriMatcher.matches()) {
String afterPath = uriMatcher.group(9);
_appendMessageType = afterPath == null || afterPath.trim().length() == 0;
}
_cookieManager = new CookieManager(getCookieStore(), CookiePolicy.ACCEPT_ALL);
}
代码示例来源:origin: com.proofpoint.platform/http-client
response = listener.get(httpClient.getIdleTimeout(), MILLISECONDS);
代码示例来源:origin: org.eclipse.jetty.http2/http2-http-client-transport
@Override
public org.eclipse.jetty.io.Connection newConnection(EndPoint endPoint, Map<String, Object> context) throws IOException
{
endPoint.setIdleTimeout(getHttpClient().getIdleTimeout());
ClientConnectionFactory factory = connectionFactory;
HttpDestinationOverHTTP2 destination = (HttpDestinationOverHTTP2)context.get(HTTP_DESTINATION_CONTEXT_KEY);
ProxyConfiguration.Proxy proxy = destination.getProxy();
boolean ssl = proxy == null ? HttpScheme.HTTPS.is(destination.getScheme()) : proxy.isSecure();
if (ssl && isUseALPN())
factory = new ALPNClientConnectionFactory(client.getExecutor(), factory, client.getProtocols());
return factory.newConnection(endPoint, context);
}
代码示例来源:origin: airlift/airlift
response = listener.get(httpClient.getIdleTimeout(), MILLISECONDS);
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
@Override
protected SelectChannelEndPoint newEndPoint(SocketChannel channel, SelectSet selectSet, SelectionKey key) throws IOException
{
// We're connected, cancel the connect timeout
Timeout.Task connectTimeout = _connectingChannels.remove(channel);
if (connectTimeout != null)
connectTimeout.cancel();
if (LOG.isDebugEnabled())
LOG.debug("Channels with connection pending: {}", _connectingChannels.size());
// key should have destination at this point (will be replaced by endpoint after this call)
HttpDestination dest=(HttpDestination)key.attachment();
SelectChannelEndPoint scep = new SelectChannelEndPoint(channel, selectSet, key, (int)_httpClient.getIdleTimeout());
AsyncEndPoint ep = scep;
if (dest.isSecure())
{
LOG.debug("secure to {}, proxied={}",channel,dest.isProxied());
ep = new UpgradableEndPoint(ep,newSslEngine(dest.getSslContextFactory(), channel));
}
AsyncConnection connection = selectSet.getManager().newConnection(channel,ep, key.attachment());
ep.setConnection(connection);
AbstractHttpConnection httpConnection=(AbstractHttpConnection)connection;
httpConnection.setDestination(dest);
if (dest.isSecure() && !dest.isProxied())
((UpgradableEndPoint)ep).upgrade();
dest.onNewConnection(httpConnection);
return scep;
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
request.idleTimeout(client.getIdleTimeout(), TimeUnit.MILLISECONDS);
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
request.idleTimeout(client.getIdleTimeout(), TimeUnit.MILLISECONDS);
代码示例来源:origin: org.eclipse.jetty.http2/http2-http-client-transport
@Override
protected void doStart() throws Exception
{
if (!client.isStarted())
{
HttpClient httpClient = getHttpClient();
client.setExecutor(httpClient.getExecutor());
client.setScheduler(httpClient.getScheduler());
client.setByteBufferPool(httpClient.getByteBufferPool());
client.setConnectTimeout(httpClient.getConnectTimeout());
client.setIdleTimeout(httpClient.getIdleTimeout());
client.setInputBufferSize(httpClient.getResponseBufferSize());
}
addBean(client);
super.doStart();
this.connectionFactory = new HTTP2ClientConnectionFactory();
client.setClientConnectionFactory((endPoint, context) ->
{
HttpDestination destination = (HttpDestination)context.get(HTTP_DESTINATION_CONTEXT_KEY);
return destination.getClientConnectionFactory().newConnection(endPoint, context);
});
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
reset();
if (persistent)
_endp.setMaxIdleTime((int)_destination.getHttpClient().getIdleTimeout());
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
reset();
if (persistent)
_endp.setMaxIdleTime((int)_destination.getHttpClient().getIdleTimeout());
内容来源于网络,如有侵权,请联系作者删除!