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

# Interface StreamSubscriber<T>

Type Parameters:
  `T` - type of the streamed data

    public interface StreamSubscriber<T>

A receiver of streaming events.

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `default void` | `onData​(ServerMethod method, StreamData<T> data)` | Method to be invoked when data is received on the stream.
  `default void` | `onData​(ServerMethod method, T data)` |
  `default void` | `onFailed​(ServerMethod method, String reason)` |
  `default void` | `onSubscribe​(StreamSubscription subscription)` |

- ## Method Details

  - ### onSubscribe

    default void onSubscribe​(StreamSubscription subscription)

  - ### onData

    default void onData​(ServerMethod method, T data)

  - ### onData

    default void onData​(ServerMethod method, StreamData<T> data)
    Method to be invoked when data is received on the stream.
    Parameters:
      `method` - the streaming method, never `null`
      `data` - the stram data, never `null`
    Since:
      1.4.2

  - ### onFailed

    default void onFailed​(ServerMethod method, String reason)