Skip to content

Commit

Permalink
Dialogue channels use EndpointChannelFactory throughout
Browse files Browse the repository at this point in the history
  • Loading branch information
carterkozak committed May 6, 2024
1 parent 9536ba6 commit f7174ec
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -482,10 +482,15 @@ public String toString() {
public Supplier<Channel> stickyChannels() {
return () -> this;
}

@Override
public EndpointChannel endpoint(Endpoint _endpoint) {
return _request -> Futures.immediateFailedFuture(exceptionSupplier.get());
}
}

/* Abstracts away DialogueChannel so that we can handle no-service/no-uri case in #getInternalDialogueChannel. */
private interface InternalDialogueChannel extends Channel {
private interface InternalDialogueChannel extends Channel, EndpointChannelFactory {
Supplier<Channel> stickyChannels();
}

Expand All @@ -502,6 +507,11 @@ public ListenableFuture<Response> execute(Endpoint endpoint, Request request) {
return dialogueChannel.execute(endpoint, request);
}

@Override
public EndpointChannel endpoint(Endpoint endpoint) {
return dialogueChannel.endpoint(endpoint);
}

@Override
public Supplier<Channel> stickyChannels() {
return dialogueChannel.stickyChannels();
Expand Down

0 comments on commit f7174ec

Please sign in to comment.