public class HttpRequesterConnectionManager extends Object implements org.mule.runtime.api.lifecycle.Disposable
HttpClients across multiple configurations based on their name, meaning two configurations spawning
from the same prototype will receive the same HttpClient.| Constructor and Description |
|---|
HttpRequesterConnectionManager() |
HttpRequesterConnectionManager(HttpService httpService) |
| Modifier and Type | Method and Description |
|---|---|
HttpClient |
create(String configName,
HttpClientConfiguration clientConfiguration)
Creates an
HttpClient associated with the given configuration name. |
void |
dispose() |
Optional<HttpClient> |
lookup(String configName)
Searches for an already existing
HttpClient associated with the desired configuration name. |
public HttpRequesterConnectionManager()
public HttpRequesterConnectionManager(HttpService httpService)
public Optional<HttpClient> lookup(String configName)
HttpClient associated with the desired configuration name.configName - the name of the client to look forOptional with an HttpClient if found or an empty one otherwisepublic HttpClient create(String configName, HttpClientConfiguration clientConfiguration)
HttpClient associated with the given configuration name. If there's already one, this operation will fail
so lookup(String) should be used first.configName - clientConfiguration - public void dispose()
dispose in interface org.mule.runtime.api.lifecycle.DisposableCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.