Interface ObjectService

All Known Subinterfaces:
Session
All Known Implementing Classes:
SessionBase, SessionImpl

public interface ObjectService
  • Method Details

    • fetchable

      CompletableFuture<? extends ObjectService.Fetchable> fetchable(HasTypedTicket typedTicket)
      Exports typedTicket to a client-managed fetchable server object.
      Parameters:
      typedTicket - the typed ticket
      Returns:
      the future
      See Also:
    • bidirectional

      CompletableFuture<? extends ObjectService.Bidirectional> bidirectional(HasTypedTicket typedTicket)
      Exports typedTicket 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. See fetchable(HasTypedTicket) for a higher-level interface.
      Parameters:
      typedTicket - the typed ticket
      Returns:
      the future
    • connect

      The low-level interface for initiating a connection for a bidirectional message stream for typedTicket. See bidirectional(HasTypedTicket) for a higher-level interface.

      Opens a bidirectional message stream for a typedTicket. References sent to the server are generic typed tickets, while the references received from the server are server objects. The caller is responsible for releasing or closing 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 ticket
      receiveStream - the stream where the client will receive messages
      Returns:
      the stream where the client will send messages