Package com.tick42.glue.core.interop
Interface Interop
public interface Interop
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfacestatic interface -
Method Summary
Modifier and TypeMethodDescriptiondefault Collection<ServerMethod>default Collection<ServerMethod>getMethods(Predicate<ServerMethod> method) default Collection<Instance>getServers(Predicate<Instance> instance) instance()<T,R> CompletionStage<MethodInvocationResult<R>> invoke(Collection<ServerMethod> method, T arg, InvocationOptions options, ReifiedType<R> returnType) methods(Interop.ServerMethodSubscriber subscriber) methods(Predicate<ServerMethod> instance, Duration timeout) default <T,R> CompletionStage<MethodRegistration> register(MethodDefinition method, SynchronousMethodInvocationHandler<T, R> handler) register(MethodDefinition method, StreamSubscriptionRequestHandler<T> handler) default <T,R> CompletionStage<MethodRegistration> register(String method, SynchronousMethodInvocationHandler<T, R> handler) <T,R> CompletionStage<MethodRegistration> registerAsync(MethodDefinition method, MethodInvocationHandler<T, R> handler) default <T,R> CompletionStage<MethodRegistration> registerAsync(String method, MethodInvocationHandler<T, R> handler) servers(Interop.InstanceSubscriber subscriber) default CompletionStage<StreamPublisher<Map<String,Object>>> stream(ServerMethod method, Map<String, Object> arg) <T,R> CompletionStage<StreamPublisher<R>> stream(ServerMethod method, T arg, ReifiedType<R> dataType) Invokes a streaming method with specified arg and returns a future for aStreamPublisher.default <T> CompletionStage<StreamPublisher<Map<String,Object>>> <T,R> CompletionStage<StreamPublisher<R>> stream(String method, T arg, ReifiedType<R> dataType)
-
Method Details
-
instance
Instance instance() -
getServers
-
getMethods
-
getServers
-
getMethods
-
methods
CompletionStage<Collection<ServerMethod>> methods(Predicate<ServerMethod> instance, Duration timeout) - Parameters:
instance- predicate for matching instancestimeout- timout for method query- Returns:
- a stage that will complete when at least one matching method is detected
- Since:
- 1.1
-
methods
-
servers
-
invoke
<T,R> CompletionStage<MethodInvocationResult<R>> invoke(Collection<ServerMethod> method, T arg, InvocationOptions options, ReifiedType<R> returnType) -
invoke
CompletionStage<MethodInvocationResult<Map<String,Object>>> invoke(String name, Map<String, Object> arg) -
registerAsync
<T,R> CompletionStage<MethodRegistration> registerAsync(MethodDefinition method, MethodInvocationHandler<T, R> handler) -
registerAsync
default <T,R> CompletionStage<MethodRegistration> registerAsync(String method, MethodInvocationHandler<T, R> handler) -
register
default <T,R> CompletionStage<MethodRegistration> register(String method, SynchronousMethodInvocationHandler<T, R> handler) -
register
default <T,R> CompletionStage<MethodRegistration> register(MethodDefinition method, SynchronousMethodInvocationHandler<T, R> handler) -
stream
<T,R> CompletionStage<StreamPublisher<R>> stream(ServerMethod method, T arg, ReifiedType<R> dataType) Invokes a streaming method with specified arg and returns a future for aStreamPublisher.- Type Parameters:
T- type of invocation argumentR- type of streamed data- Parameters:
method- streaming method to be invokedarg- method invocation argumentdataType- type of streamed events- Returns:
- a stage that completes when the stream publisher is resolved
- Since:
- 1.1
-
stream
-
stream
-
stream
default CompletionStage<StreamPublisher<Map<String,Object>>> stream(ServerMethod method, Map<String, Object> arg) -
register
<T> CompletionStage<StreamProducer> register(MethodDefinition method, StreamSubscriptionRequestHandler<T> handler)
-