本文整理了Java中org.eclipse.jetty.client.HttpClient.getConnectTimeout()
方法的一些代码示例,展示了HttpClient.getConnectTimeout()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpClient.getConnectTimeout()
方法的具体详情如下:
包路径:org.eclipse.jetty.client.HttpClient
类名称:HttpClient
方法名:getConnectTimeout
暂无
代码示例来源:origin: org.eclipse.jetty.websocket/websocket-client
public long getConnectTimeout()
{
return httpClient.getConnectTimeout();
}
代码示例来源:origin: RusticiSoftware/TinCanJava
/**
* Get the connect timeout value for the default HTTP client
*
* @deprecated set your own HTTP client using {@link #setHttpClient(HttpClient client)}
*/
@Deprecated
public static long getHTTPClientConnectTimeout() {
return _httpClient.getConnectTimeout();
}
代码示例来源:origin: org.apache.camel/camel-jetty9
protected void onExpire() {
LOG.trace("onExpire");
// need to close the request input stream
closeRequestContentSource();
doTaskCompleted(new ExchangeTimedOutException(exchange, client.getConnectTimeout()));
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
channel.socket().connect(address.toSocketAddress(), _httpClient.getConnectTimeout());
channel.configureBlocking(false);
_selectorManager.register( channel, destination );
_selectorManager.register(channel,destination);
ConnectTimeout connectTimeout = new ConnectTimeout(channel,destination);
_httpClient.schedule(connectTimeout,_httpClient.getConnectTimeout());
_connectingChannels.put(channel,connectTimeout);
代码示例来源:origin: org.eclipse.jetty/jetty-client
@Override
protected void doStart() throws Exception
{
HttpClient httpClient = getHttpClient();
selectorManager = newSelectorManager(httpClient);
selectorManager.setConnectTimeout(httpClient.getConnectTimeout());
addBean(selectorManager);
super.doStart();
}
代码示例来源:origin: org.eclipse.jetty/jetty-client
if (client.isConnectBlocking())
channel.socket().connect(address, (int)client.getConnectTimeout());
channel.configureBlocking(false);
代码示例来源:origin: org.eclipse.jetty.http2/http2-http-client-transport
@Override
public void connect(InetSocketAddress address, Map<String, Object> context)
{
HttpClient httpClient = getHttpClient();
client.setConnectTimeout(httpClient.getConnectTimeout());
client.setConnectBlocking(httpClient.isConnectBlocking());
client.setBindAddress(httpClient.getBindAddress());
SessionListenerPromise listenerPromise = new SessionListenerPromise(context);
HttpDestinationOverHTTP2 destination = (HttpDestinationOverHTTP2)context.get(HTTP_DESTINATION_CONTEXT_KEY);
SslContextFactory sslContextFactory = null;
if (HttpScheme.HTTPS.is(destination.getScheme()))
sslContextFactory = httpClient.getSslContextFactory();
connect(sslContextFactory, address, listenerPromise, listenerPromise, context);
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
socket.connect(address.toSocketAddress(), _httpClient.getConnectTimeout());
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
selectorManager.setConnectTimeout(getConnectTimeout());
addBean(selectorManager);
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
selectorManager.setConnectTimeout(getConnectTimeout());
addBean(selectorManager);
代码示例来源: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: com.ovea.tajin.servers/tajin-server-jetty9
.path(target)
.header(HttpHeader.HOST.asString(), target)
.timeout(client.getConnectTimeout(), TimeUnit.MILLISECONDS);
connection.send(connect, new Response.CompleteListener()
代码示例来源:origin: org.eclipse.jetty/jetty-client
Origin.Address proxyAddress = destination.getConnectAddress();
HttpClient httpClient = destination.getHttpClient();
long connectTimeout = httpClient.getConnectTimeout();
Request connect = httpClient.newRequest(proxyAddress.getHost(), proxyAddress.getPort())
.method(HttpMethod.CONNECT)
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
.path(target)
.header(HttpHeader.HOST.asString(), target)
.timeout(client.getConnectTimeout(), TimeUnit.MILLISECONDS);
connection.send(connect, new Response.CompleteListener()
内容来源于网络,如有侵权,请联系作者删除!