Interface ObjectService
- All Known Subinterfaces:
Session
- All Known Implementing Classes:
SessionBase
,SessionImpl
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
A server object that supports a bidirectional message stream.static interface
A server object that supports fetching.static interface
The sending and receiving interface forconnect(HasTypedTicket, MessageStream)
. -
Method Summary
Modifier and TypeMethodDescriptionCompletableFuture<? extends ObjectService.Bidirectional>
bidirectional
(HasTypedTicket typedTicket) ExportstypedTicket
to a client-managed bidirectional server object.connect
(HasTypedTicket typedTicket, ObjectService.MessageStream<ServerData> receiveStream) The low-level interface for initiating a connection for a bidirectional message stream fortypedTicket
.fetch
(HasTypedTicket typedTicket) The low-level interface for fetching data.CompletableFuture<? extends ObjectService.Fetchable>
fetchable
(HasTypedTicket typedTicket) ExportstypedTicket
to a client-managed fetchable server object.
-
Method Details
-
fetchable
ExportstypedTicket
to a client-managed fetchable server object.- Parameters:
typedTicket
- the typed ticket- Returns:
- the future
- See Also:
-
bidirectional
ExportstypedTicket
to a client-managed bidirectional server object.- Parameters:
typedTicket
- the typed ticket- Returns:
- the future
- See Also:
-
fetch
The low-level interface for fetching data. Seefetchable(HasTypedTicket)
for a higher-level interface.- Parameters:
typedTicket
- the typed ticket- Returns:
- the future
-
connect
ObjectService.MessageStream<ClientData> connect(HasTypedTicket typedTicket, ObjectService.MessageStream<ServerData> receiveStream) The low-level interface for initiating a connection for a bidirectional message stream fortypedTicket
. Seebidirectional(HasTypedTicket)
for a higher-level interface.Opens a bidirectional message stream for a
typedTicket
. References sent to the server are generictyped tickets
, while the references received from the server areserver objects
. The caller is responsible forreleasing
orclosing
the server objects.This provides a generic stream feature for Deephaven instances to use to add arbitrary functionality. This API lets a client open a stream to a particular object on the server, to be mediated by a server side plugin. In theory this could effectively be used to "tunnel" a custom gRPC call, but in practice there are a few deliberate shortcomings that still make this possible, but not trivial.
Presently it is required that the server respond immediately, at least to acknowledge that the object was correctly contacted (as opposed to waiting for a pending ticket, or dealing with network lag, etc). This is a small (and possibly not required, but convenient) departure from a offering a gRPC stream (a server-streaming or bidi-streaming call need not send a message right away).
- Parameters:
typedTicket
- the typed ticketreceiveStream
- the stream where the client will receive messages- Returns:
- the stream where the client will send messages
-