Search in sources :

Example 1 with SharedHttpClient

use of io.vertx.core.http.impl.SharedHttpClient in project vert.x by eclipse.

the class VertxImpl method createHttpClient.

public HttpClient createHttpClient(HttpClientOptions options) {
    CloseFuture closeFuture = new CloseFuture();
    HttpClient client;
    if (options.isShared()) {
        client = createSharedClient(SharedHttpClient.SHARED_MAP_NAME, options.getName(), closeFuture, cf -> createHttpClient(options, cf));
        client = new SharedHttpClient(this, closeFuture, client);
    } else {
        client = createHttpClient(options, closeFuture);
    }
    resolveCloseFuture().add(closeFuture);
    return client;
}
Also used : HttpServerImpl(io.vertx.core.http.impl.HttpServerImpl) NetServerImpl(io.vertx.core.net.impl.NetServerImpl) DnsResolverProvider(io.vertx.core.impl.resolver.DnsResolverProvider) HttpClientImpl(io.vertx.core.http.impl.HttpClientImpl) HttpServer(io.vertx.core.http.HttpServer) NetClientImpl(io.vertx.core.net.impl.NetClientImpl) VertxThreadFactory(io.vertx.core.spi.VertxThreadFactory) AddressResolverOptions(io.vertx.core.dns.AddressResolverOptions) InetAddress(java.net.InetAddress) EventBus(io.vertx.core.eventbus.EventBus) WindowsFileSystem(io.vertx.core.file.impl.WindowsFileSystem) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Map(java.util.Map) DatagramSocketOptions(io.vertx.core.datagram.DatagramSocketOptions) Logger(io.vertx.core.impl.logging.Logger) ClusterManager(io.vertx.core.spi.cluster.ClusterManager) java.util.concurrent(java.util.concurrent) Set(java.util.Set) MetricsProvider(io.vertx.core.spi.metrics.MetricsProvider) EventLoop(io.netty.channel.EventLoop) ResourceLeakDetector(io.netty.util.ResourceLeakDetector) Future(io.vertx.core.Future) ServerID(io.vertx.core.net.impl.ServerID) InetSocketAddress(java.net.InetSocketAddress) NetClientOptions(io.vertx.core.net.NetClientOptions) DnsClient(io.vertx.core.dns.DnsClient) AddressResolverGroup(io.netty.resolver.AddressResolverGroup) NetServerOptions(io.vertx.core.net.NetServerOptions) PoolMetrics(io.vertx.core.spi.metrics.PoolMetrics) FileSystem(io.vertx.core.file.FileSystem) HttpClient(io.vertx.core.http.HttpClient) DatagramSocketImpl(io.vertx.core.datagram.impl.DatagramSocketImpl) VerticleFactory(io.vertx.core.spi.VerticleFactory) LoggerFactory(io.vertx.core.impl.logging.LoggerFactory) io.vertx.core(io.vertx.core) DatagramSocket(io.vertx.core.datagram.DatagramSocket) DnsClientImpl(io.vertx.core.dns.impl.DnsClientImpl) DnsClientOptions(io.vertx.core.dns.DnsClientOptions) HashMap(java.util.HashMap) Supplier(java.util.function.Supplier) SharedData(io.vertx.core.shareddata.SharedData) VertxMetrics(io.vertx.core.spi.metrics.VertxMetrics) ArrayList(java.util.ArrayList) SharedDataImpl(io.vertx.core.shareddata.impl.SharedDataImpl) EventBusInternal(io.vertx.core.eventbus.impl.EventBusInternal) FileResolver(io.vertx.core.spi.file.FileResolver) HttpClientOptions(io.vertx.core.http.HttpClientOptions) NetClient(io.vertx.core.net.NetClient) WeakReference(java.lang.ref.WeakReference) Metrics(io.vertx.core.spi.metrics.Metrics) EventBusImpl(io.vertx.core.eventbus.impl.EventBusImpl) EventLoopGroup(io.netty.channel.EventLoopGroup) PromiseInternal(io.vertx.core.impl.future.PromiseInternal) Transport(io.vertx.core.net.impl.transport.Transport) NodeSelector(io.vertx.core.spi.cluster.NodeSelector) GenericFutureListener(io.netty.util.concurrent.GenericFutureListener) ExecutorServiceFactory(io.vertx.core.spi.ExecutorServiceFactory) VertxTracer(io.vertx.core.spi.tracing.VertxTracer) IOException(java.io.IOException) SharedHttpClient(io.vertx.core.http.impl.SharedHttpClient) File(java.io.File) FileSystemImpl(io.vertx.core.file.impl.FileSystemImpl) AtomicLong(java.util.concurrent.atomic.AtomicLong) NetServer(io.vertx.core.net.NetServer) TCPServerBase(io.vertx.core.net.impl.TCPServerBase) HttpServerOptions(io.vertx.core.http.HttpServerOptions) ClusteredEventBus(io.vertx.core.eventbus.impl.clustered.ClusteredEventBus) HttpClient(io.vertx.core.http.HttpClient) SharedHttpClient(io.vertx.core.http.impl.SharedHttpClient) SharedHttpClient(io.vertx.core.http.impl.SharedHttpClient)

Aggregations

EventLoop (io.netty.channel.EventLoop)1 EventLoopGroup (io.netty.channel.EventLoopGroup)1 AddressResolverGroup (io.netty.resolver.AddressResolverGroup)1 ResourceLeakDetector (io.netty.util.ResourceLeakDetector)1 GenericFutureListener (io.netty.util.concurrent.GenericFutureListener)1 io.vertx.core (io.vertx.core)1 Future (io.vertx.core.Future)1 DatagramSocket (io.vertx.core.datagram.DatagramSocket)1 DatagramSocketOptions (io.vertx.core.datagram.DatagramSocketOptions)1 DatagramSocketImpl (io.vertx.core.datagram.impl.DatagramSocketImpl)1 AddressResolverOptions (io.vertx.core.dns.AddressResolverOptions)1 DnsClient (io.vertx.core.dns.DnsClient)1 DnsClientOptions (io.vertx.core.dns.DnsClientOptions)1 DnsClientImpl (io.vertx.core.dns.impl.DnsClientImpl)1 EventBus (io.vertx.core.eventbus.EventBus)1 EventBusImpl (io.vertx.core.eventbus.impl.EventBusImpl)1 EventBusInternal (io.vertx.core.eventbus.impl.EventBusInternal)1 ClusteredEventBus (io.vertx.core.eventbus.impl.clustered.ClusteredEventBus)1 FileSystem (io.vertx.core.file.FileSystem)1 FileSystemImpl (io.vertx.core.file.impl.FileSystemImpl)1