Package com.tick42.glue.core.interop

# Interface Interop

    public interface Interop

- ## Nested Class Summary

  Nested Classes
  Modifier and Type | Interface | Description
  --- | --- | ---
  `static interface` | `Interop.InstanceSubscriber` |
  `static interface` | `Interop.ServerMethodSubscriber` |

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `default Collection<ServerMethod>` | `getMethods()` |
  `default Collection<ServerMethod>` | `getMethods​(Predicate<ServerMethod> method)` |
  `default Collection<Instance>` | `getServers()` |
  `Collection<Instance>` | `getServers​(Predicate<Instance> instance)` |
  `Instance` | `instance()` |
  `CompletionStage<MethodInvocationResult<Map<String,​Object>>>` | `invoke​(String name, Map<String,​Object> arg)` |
  `<T,​ R> CompletionStage<MethodInvocationResult<R>>` | `invoke​(Collection<ServerMethod> method, T arg, InvocationOptions options, ReifiedType<R> returnType)` |
  `CompletionStage<AsynchronousCloseable>` | `methods​(Interop.ServerMethodSubscriber subscriber)` |
  `CompletionStage<Collection<ServerMethod>>` | `methods​(Predicate<ServerMethod> instance, Duration timeout)` |
  `default <T,​ R> CompletionStage<MethodRegistration>` | `register​(MethodDefinition method, SynchronousMethodInvocationHandler<T,​R> handler)` |
  `<T> CompletionStage<StreamProducer>` | `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)` |
  `CompletionStage<AsynchronousCloseable>` | `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 a `StreamPublisher`.
  `default <T> CompletionStage<StreamPublisher<Map<String,​Object>>>` | `stream​(String method, T arg)` |
  `<T,​ R> CompletionStage<StreamPublisher<R>>` | `stream​(String method, T arg, ReifiedType<R> dataType)` |

- ## Method Details

  - ### instance

    Instance instance()

  - ### getServers

    default Collection<Instance> getServers()

  - ### getMethods

    default Collection<ServerMethod> getMethods()

  - ### getServers

    Collection<Instance> getServers​(Predicate<Instance> instance)

  - ### getMethods

    default Collection<ServerMethod> getMethods​(Predicate<ServerMethod> method)

  - ### methods

    CompletionStage<Collection<ServerMethod>> methods​(Predicate<ServerMethod> instance, Duration timeout)
    Parameters:
      `instance` - predicate for matching instances
      `timeout` - timout for method query
    Returns:
      a stage that will complete when at least one matching method is detected
    Since:
      1.1

  - ### methods

    CompletionStage<AsynchronousCloseable> methods​(Interop.ServerMethodSubscriber subscriber)

  - ### servers

    CompletionStage<AsynchronousCloseable> servers​(Interop.InstanceSubscriber subscriber)

  - ### 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 a `StreamPublisher`.
    Type Parameters:
      `T` - type of invocation argument
      `R` - type of streamed data
    Parameters:
      `method` - streaming method to be invoked
      `arg` - method invocation argument
      `dataType` - type of streamed events
    Returns:
      a stage that completes when the stream publisher is resolved
    Since:
      1.1

  - ### stream

    <T,​ R> CompletionStage<StreamPublisher<R>> stream​(String method, T arg, ReifiedType<R> dataType)

  - ### stream

    default <T> CompletionStage<StreamPublisher<Map<String,​Object>>> stream​(String method, T arg)

  - ### stream

    default CompletionStage<StreamPublisher<Map<String,​Object>>> stream​(ServerMethod method, Map<String,​Object> arg)

  - ### register

    <T> CompletionStage<StreamProducer> register​(MethodDefinition method, StreamSubscriptionRequestHandler<T> handler)