List of usage examples for io.vertx.core.http HttpHeaders createOptimized
public static CharSequence createOptimized(String value)
From source file:org.hawkular.metrics.clients.ptrans.backend.MetricsSender.java
License:Apache License
public MetricsSender(Configuration configuration) { URI restUrl = configuration.getRestUrl(); URI httpProxy = configuration.getHttpProxy(); if (httpProxy == null) { host = restUrl.getHost();// w ww . java2 s. co m port = restUrl.getPort(); postUri = restUrl.getPath(); } else { host = httpProxy.getHost(); port = httpProxy.getPort(); postUri = restUrl.toString(); } hostHeader = HttpHeaders.createOptimized(restUrl.getHost()); tenant = HttpHeaders.createOptimized(configuration.getTenant()); buffer = new MetricBuffer(configuration.getBufferCapacity()); batchSize = configuration.getBatchSize(); maxConnections = configuration.getRestMaxConnections(); }