Search in sources :

Example 1 with DialogueClientOptions

use of com.palantir.atlasdb.http.v2.DialogueClientOptions in project atlasdb by palantir.

the class BroadcastDialogueClientFactory method create.

public static BroadcastDialogueClientFactory create(DialogueClients.ReloadingFactory baseFactory, Refreshable<ServerListConfig> serverListConfigSupplier, UserAgent userAgent, AuxiliaryRemotingParameters parameters) {
    UserAgent versionedAgent = userAgent.addAgent(AtlasDbRemotingConstants.ATLASDB_HTTP_CLIENT_AGENT);
    Refreshable<Map<String, RemoteServiceConfiguration>> timeLockRemoteConfigurations = serverListConfigSupplier.map(serverListConfig -> createRemoteServiceConfigurations(serverListConfig, versionedAgent, parameters));
    DialogueClients.ReloadingFactory reloadingFactory = baseFactory.reloading(timeLockRemoteConfigurations.map(DialogueClientOptions::toServicesConfigBlock)).withUserAgent(versionedAgent);
    return new BroadcastDialogueClientFactory(reloadingFactory, serverListConfigSupplier);
}
Also used : DialogueClientOptions(com.palantir.atlasdb.http.v2.DialogueClientOptions) UserAgent(com.palantir.conjure.java.api.config.service.UserAgent) Map(java.util.Map) DialogueClients(com.palantir.dialogue.clients.DialogueClients)

Aggregations

DialogueClientOptions (com.palantir.atlasdb.http.v2.DialogueClientOptions)1 UserAgent (com.palantir.conjure.java.api.config.service.UserAgent)1 DialogueClients (com.palantir.dialogue.clients.DialogueClients)1 Map (java.util.Map)1