-
Notifications
You must be signed in to change notification settings - Fork 10.7k
[API] Add client result support to Java client #41777
Copy link
Copy link
Closed
Labels
DocsThis issue tracks updating documentationThis issue tracks updating documentationapi-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-signalrIncludes: SignalR clients and serversIncludes: SignalR clients and serversfeature-client-javaRelated to the SignalR Java clientRelated to the SignalR Java client
Milestone
Metadata
Metadata
Assignees
Labels
DocsThis issue tracks updating documentationThis issue tracks updating documentationapi-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-signalrIncludes: SignalR clients and serversIncludes: SignalR clients and serversfeature-client-javaRelated to the SignalR Java clientRelated to the SignalR Java client
Type
Fields
Give feedbackNo fields configured for issues without a type.
Background and Motivation
Adding async
.Onhandlers for the SignalR Java client in order to better support client results.Adding
.Onoverloads (and types) to support client results.Proposed API
public interface Action1<T1> { void invoke(T1 param1); } + public interface Action1Completable<T1> { + Completable invoke(T1 param1); + } //... + Action8Completable<T1, ..., T8>class HubConnection { + public <T> Subscription on(String target, Function<T> callback); + public <T> Subscription on(String target, FunctionSingle<T> callback); + public <T1, T> Subscription on(String target, Function1<T1, T> callback, Class<T1> param1); + public <T1> Subscription on(String target, Action1Completable<T1> callback, Class<T1> param1); // etc. to 8 args each }Usage