Package io.deephaven.plugin.type
Interface ObjectType.MessageStream
- Enclosing interface:
- ObjectType
public static interface ObjectType.MessageStream
A stream of messages, either sent from the server to the client, or client to the server. ObjectType plugin
implementations provide an instance of this interface for each incoming stream to invoke as messages arrive, and
will likewise be given an instance of this interface to be able to send messages to the client.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ObjectType.MessageStream
Simple stream that does no handling on data or close. -
Method Summary
Modifier and TypeMethodDescriptionvoid
onClose()
Closes the stream on both ends.void
onData
(ByteBuffer payload, Object... references) Transmits/receives data to/from the remote end of the stream.
-
Field Details
-
NOOP
Simple stream that does no handling on data or close.
-
-
Method Details
-
onData
Transmits/receives data to/from the remote end of the stream. This can consist of a binary payload and references to objects on the server.onData call from a client
, or thecall to create the stream
, but it is usually unsafe to let this propagate to other engine threads.- Parameters:
payload
- the binary data sent to the remote implementationreferences
- server-side object references sent to the remote implementation- Throws:
ObjectCommunicationException
- a checked exception for any errors that may occur, to ensure that the error is handled without propagating.
-
onClose
void onClose()Closes the stream on both ends. No further messages can be sent or received.
-