Package com.tick42.glue.core.interop.stream.publish

# Interface StreamConsumer<T>

Type Parameters:
  `T` - type of the subscription request argument

All Superinterfaces:
  `AsynchronousCloseable`, `AutoCloseable`

    public interface StreamConsumer<T>
    extends AsynchronousCloseable

Accepted stream consumer.

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `T` | `getArg()` |
  `String` | `getBranch()` |
  `Instance` | `getCaller()` |
  `CompletionStage<Void>` | `onClose()` | Return a stage that will complete when `AsynchronousCloseable.closeAsync()` is called and shutdown completes.
  `CompletionStage<Void>` | `onOpen()` | Returns a stage that will complete when the stream is subscribed.
  `<E> CompletionStage<?>` | `send​(E data)` |

  ### Methods inherited from interface com.tick42.glue.core.AsynchronousCloseable

  `close, closeAsync`

- ## Method Details

  - ### getArg

    T getArg()

  - ### getCaller

    Instance getCaller()

  - ### getBranch

    String getBranch()

  - ### send

    <E> CompletionStage<?> send​(E data)

  - ### onOpen

    CompletionStage<Void> onOpen()
    Returns a stage that will complete when the stream is subscribed.
    Returns:
      A stage that will complete when the stream is subscribed, never `null`
    Since:
      1.1

  - ### onClose

    CompletionStage<Void> onClose()
    Description copied from interface: `AsynchronousCloseable`
    Return a stage that will complete when `AsynchronousCloseable.closeAsync()` is called and shutdown completes.
    Specified by:
      `onClose` in interface `AsynchronousCloseable`
    Returns:
      a stage that will complete when shutdown is complete, never `null`