Class DialogueClients
java.lang.Object
com.palantir.dialogue.clients.DialogueClients
The
once for the lifetime of
a JVM. There is no need to manually close clients or connection pools, this will be done automatically.
Libraries may depend on interfaces contained in this class and/or interfaces from conjure-java-runtime's
DialogueClients.ReloadingFactory abstraction allows users to declaratively construct clients for any of the services
named in the given ServicesConfigBlock. Client behaviour can be customized using the fluent methods from
ConjureClients.WithClientOptions or DialogueClients.WithDialogueOptions. Users may also choose to create one-off non-live reloading
clients.
For maximum performance, we take great care to re-use underlying Apache connection pools as this avoids unnecessary
TLS handshakes. To achieve this, it is recommended to call
invalid reference
ReloadingFactory#create
ConjureClients. All other classes in this package are considered package-private implementation details
and are subject to change.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interfacestatic interfacestatic interfaceLow-level API.static interfacestatic interfaceA stateful object - should only need one of these.static interfaceA stateful object - should only need one of these.static interfaceRepresents a single session ofDialogueClients.StickyChannelFactory2where the underlying channel will not change.static interfaceParameters necessary forDialogueChannel.builder()and constructing an actual BlockingFoo instance. -
Method Summary
Modifier and TypeMethodDescriptioncreate(com.palantir.refreshable.Refreshable<com.palantir.conjure.java.api.config.service.ServicesConfigBlock> scb) static <T> Tcreate(Class<T> clientInterface, com.palantir.conjure.java.client.config.ClientConfiguration clientConfiguration) Prefercreate(Refreshable).
-
Method Details
-
create
public static DialogueClients.ReloadingFactory create(com.palantir.refreshable.Refreshable<com.palantir.conjure.java.api.config.service.ServicesConfigBlock> scb) -
create
public static <T> T create(Class<T> clientInterface, com.palantir.conjure.java.client.config.ClientConfiguration clientConfiguration) Prefercreate(Refreshable). Using a configuredDialogueClients.ReloadingFactoryshould always be preferred over this method, it only exists to ease migration. Construct an instance of the givenclientInterfacewhich can be used to make network calls to the single conceptual upstream identified byclientConfiguration. Behaviour is undefined ifclientConfigurationcontains no URIs.- Parameters:
clientInterface- Dialogue client interface annotated withDialogueServiceclientConfiguration- Configuration which must contain a user-agent
-