Interface RemoteStream<M,P extends BufferWriter>
- Type Parameters:
M- associated metadata with the streamP- the payload type that can be pushed to the stream
- All Known Implementing Classes:
RemoteStreamImpl
public interface RemoteStream<M,P extends BufferWriter>
A
RemoteStream is a unidirectional stream from the Broker to a Gateway. A RemoteStream allows consumers to push out payload of type RemoteStream to a Gateway.
NOTE: it's up to consumers of this API to interpret the metadata metadata() and its
relation to the payload.
NOTE: implementations of the push(BufferWriter), so the payload should be
immutable.
-
Method Summary
-
Method Details
-
metadata
M metadata()Returns the stream's metadata -
push
Pushes the given payload to the stream. Implementations of this are likely asynchronous; it's recommended that callers ensure that the given payload is immutable, and that the error handler does not close over any shared state.- Parameters:
payload- the data to push to the remote gateway
-