Class Tickets

java.lang.Object
io.deephaven.web.client.api.Tickets

public class Tickets extends Object
Single factory for known ticket types. By definition, this cannot be exhaustive, since flight tickets have no inherent structure - Deephaven Core only specifies that the first byte will indicate the type of ticket, and later bytes will be handled by handlers for that type. Deephaven Core requires only that export tickets be support, but also offers application tickets, scope tickets, and shared tickets. Downstream projects may define new ticket types, which won't necessarily be understood by this client.
See Also:
  • Constructor Details

    • Tickets

      public Tickets()
  • Method Details

    • createTicket

      public static Ticket createTicket(JsVariableDefinition varDef)
      Utility method to create a ticket from a known-valid base64 encoding of a ticket.

      Use caution with non-export tickets, the definition may change between calls to the server - they should be exported before use.

      Parameters:
      varDef - the variable definition to create a ticket from
      Returns:
      a ticket with the variable's id as the ticket bytes
    • createTableRef

      public static TableReference createTableRef(JsVariableDefinition varDef)
      Utility method to create a ticket wrapped in a TableReference from a known-valid base64 encoding of a ticket.

      Use caution with non-export tickets, the definition may change between calls to the server - they should be exported before use.

      Parameters:
      varDef - the variable definition to create a ticket from
      Returns:
      a table reference with the variable's id as the ticket bytes
    • validateScopeOrApplicationTicketBase64

      public static void validateScopeOrApplicationTicketBase64(String base64Bytes)
    • newExportTicket

      public Ticket newExportTicket()
      Provides the next export id for the current session as a ticket.
      Returns:
      a new ticket with an export id that hasn't previously been used for this session
    • newTicketInt

      public int newTicketInt()
      Provides the next export id for the current session.
      Returns:
      the next export id
    • newTableTicket

      public TableTicket newTableTicket()
      Provides the next export id for the current session as a table ticket.
      Returns:
      a new table ticket with an export id that hasn't previously been used for this session
    • sharedTicket

      public Ticket sharedTicket(elemental2.core.TypedArray.SetArrayUnionType array)
      Creates a shared ticket from the provided array of bytes.

      Use caution with non-export tickets, the definition may change between calls to the server - they should be exported before use.

      Parameters:
      array - array of bytes to populate the ticket with
      Returns:
      a new shared ticket