Package io.deephaven.server.console
Class ScopeTicketResolver
java.lang.Object
io.deephaven.server.session.PathResolverPrefixedBase
io.deephaven.server.session.TicketResolverBase
io.deephaven.server.console.ScopeTicketResolver
- All Implemented Interfaces:
PathResolver,TicketResolver
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.server.session.TicketResolver
TicketResolver.Authorization -
Field Summary
Fields inherited from class io.deephaven.server.session.TicketResolverBase
authorization -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.arrow.flight.impl.Flight.FlightDescriptordescriptorForName(String name) Convenience method to convert from a scoped variable name to Flight.FlightDescriptorstatic org.apache.arrow.flight.impl.Flight.TicketdescriptorToTicket(org.apache.arrow.flight.impl.Flight.FlightDescriptor descriptor, String logId) Convenience method to convert from a Flight.Descriptor to a Flight.Ticket.SessionState.ExportObject<org.apache.arrow.flight.impl.Flight.FlightInfo>flightInfoFor(@Nullable SessionState session, org.apache.arrow.flight.impl.Flight.FlightDescriptor descriptor, String logId) Retrieve a FlightInfo for a given FlightDescriptor.static org.apache.arrow.flight.impl.Flight.TicketflightTicketForName(String name) Convenience method to convert from a scoped variable name to Flight.TicketvoidforAllFlightInfo(@Nullable SessionState session, Consumer<org.apache.arrow.flight.impl.Flight.FlightInfo> visitor) This invokes the provided visitor for each valid flight descriptor this ticket resolver exposes via flight.getLogNameFor(ByteBuffer ticket, String logId) Create a human readable string to identify this ticket.static StringnameForDescriptor(org.apache.arrow.flight.impl.Flight.FlightDescriptor descriptor, String logId) Convenience method to convert from a Flight.FlightDescriptor to scoped Variable Namestatic StringnameForTicket(ByteBuffer ticket, String logId) Convenience method to convert from a Flight.Ticket (as ByteBuffer) to scope variable name<T> SessionState.ExportBuilder<T>publish(SessionState session, ByteBuffer ticket, String logId, @Nullable Runnable onPublish) Publish a new result as a flight ticket to an export object future.<T> SessionState.ExportBuilder<T>publish(SessionState session, org.apache.arrow.flight.impl.Flight.FlightDescriptor descriptor, String logId, @Nullable Runnable onPublish) Publish a new result as a flight descriptor to an export object future.<T> SessionState.ExportObject<T>resolve(@Nullable SessionState session, ByteBuffer ticket, String logId) Resolve a flight ticket to an export object future.<T> SessionState.ExportObject<T>resolve(@Nullable SessionState session, org.apache.arrow.flight.impl.Flight.FlightDescriptor descriptor, String logId) Resolve a flight descriptor to an export object future.static TicketticketForName(String name) Convenience method to convert from a scoped variable name to Ticketstatic org.apache.arrow.flight.impl.Flight.FlightDescriptorticketToDescriptor(org.apache.arrow.flight.impl.Flight.Ticket ticket, String logId) Convenience method to convert from a Flight.Ticket to a Flight.FlightDescriptor.Methods inherited from class io.deephaven.server.session.TicketResolverBase
ticketRouteMethods inherited from class io.deephaven.server.session.PathResolverPrefixedBase
flightDescriptorRoute, handlesPathMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.deephaven.server.session.TicketResolver
publish
-
Constructor Details
-
ScopeTicketResolver
-
-
Method Details
-
getLogNameFor
Description copied from interface:TicketResolverCreate a human readable string to identify this ticket.- Parameters:
ticket- the ticket to parselogId- an end-user friendly identification of the ticket should an error occur- Returns:
- a string that is good for log/error messages
-
flightInfoFor
public SessionState.ExportObject<org.apache.arrow.flight.impl.Flight.FlightInfo> flightInfoFor(@Nullable @Nullable SessionState session, org.apache.arrow.flight.impl.Flight.FlightDescriptor descriptor, String logId) Description copied from interface:TicketResolverRetrieve a FlightInfo for a given FlightDescriptor.descriptor- the flight descriptor to retrieve a ticket forlogId- an end-user friendly identification of the ticket should an error occur- Returns:
- a FlightInfo describing this flight
-
forAllFlightInfo
public void forAllFlightInfo(@Nullable @Nullable SessionState session, Consumer<org.apache.arrow.flight.impl.Flight.FlightInfo> visitor) Description copied from interface:TicketResolverThis invokes the provided visitor for each valid flight descriptor this ticket resolver exposes via flight.- Parameters:
session- optional session that the resolver can use to filter which flights a visitor seesvisitor- the callback to invoke per descriptor path
-
resolve
public <T> SessionState.ExportObject<T> resolve(@Nullable @Nullable SessionState session, ByteBuffer ticket, String logId) Description copied from interface:TicketResolverResolve a flight ticket to an export object future.- Type Parameters:
T- the expected return type of the ticket; this is not validated- Parameters:
session- the user session contextticket- (as ByteByffer) the ticket to resolvelogId- an end-user friendly identification of the ticket should an error occur- Returns:
- an export object; see
SessionStatefor lifecycle propagation details
-
resolve
public <T> SessionState.ExportObject<T> resolve(@Nullable @Nullable SessionState session, org.apache.arrow.flight.impl.Flight.FlightDescriptor descriptor, String logId) Description copied from interface:TicketResolverResolve a flight descriptor to an export object future.- Type Parameters:
T- the expected return type of the ticket; this is not validated- Parameters:
session- the user session contextdescriptor- the descriptor to resolvelogId- an end-user friendly identification of the ticket should an error occur- Returns:
- an export object; see
SessionStatefor lifecycle propagation details
-
publish
public <T> SessionState.ExportBuilder<T> publish(SessionState session, ByteBuffer ticket, String logId, @Nullable @Nullable Runnable onPublish) Description copied from interface:TicketResolverPublish a new result as a flight ticket to an export object future.The user must call
SessionState.ExportBuilder.submit(java.util.concurrent.Callable<T>)to publish the result value.- Type Parameters:
T- the type of the result the export will publish- Parameters:
session- the user session contextticket- (as ByteByffer) the ticket to publish tologId- an end-user friendly identification of the ticket should an error occuronPublish- an optional callback to invoke when the result is published- Returns:
- an export object; see
SessionStatefor lifecycle propagation details
-
publish
public <T> SessionState.ExportBuilder<T> publish(SessionState session, org.apache.arrow.flight.impl.Flight.FlightDescriptor descriptor, String logId, @Nullable @Nullable Runnable onPublish) Description copied from interface:TicketResolverPublish a new result as a flight descriptor to an export object future.The user must call
SessionState.ExportBuilder.submit(java.util.concurrent.Callable<T>)to publish the result value.- Type Parameters:
T- the type of the result the export will publish- Parameters:
session- the user session contextdescriptor- (as Flight.Descriptor) the descriptor to publish tologId- an end-user friendly identification of the ticket should an error occuronPublish- an optional callback to invoke when the result is published- Returns:
- an export object; see
SessionStatefor lifecycle propagation details
-
flightTicketForName
Convenience method to convert from a scoped variable name to Flight.Ticket- Parameters:
name- the scoped variable name to convert- Returns:
- the flight ticket this descriptor represents
-
ticketForName
Convenience method to convert from a scoped variable name to Ticket- Parameters:
name- the scoped variable name to convert- Returns:
- the flight ticket this descriptor represents
-
descriptorForName
Convenience method to convert from a scoped variable name to Flight.FlightDescriptor- Parameters:
name- the scoped variable name to convert- Returns:
- the flight descriptor this descriptor represents
-
nameForTicket
Convenience method to convert from a Flight.Ticket (as ByteBuffer) to scope variable name- Parameters:
ticket- the ticket to convertlogId- an end-user friendly identification of the ticket should an error occur- Returns:
- the query scope name this ticket represents
-
nameForDescriptor
public static String nameForDescriptor(org.apache.arrow.flight.impl.Flight.FlightDescriptor descriptor, String logId) Convenience method to convert from a Flight.FlightDescriptor to scoped Variable Name- Parameters:
descriptor- the descriptor to convertlogId- an end-user friendly identification of the ticket should an error occur- Returns:
- the query scope name this descriptor represents
-
ticketToDescriptor
public static org.apache.arrow.flight.impl.Flight.FlightDescriptor ticketToDescriptor(org.apache.arrow.flight.impl.Flight.Ticket ticket, String logId) Convenience method to convert from a Flight.Ticket to a Flight.FlightDescriptor.- Parameters:
ticket- the ticket to convertlogId- an end-user friendly identification of the ticket should an error occur- Returns:
- a flight descriptor that represents the ticket
-
descriptorToTicket
public static org.apache.arrow.flight.impl.Flight.Ticket descriptorToTicket(org.apache.arrow.flight.impl.Flight.FlightDescriptor descriptor, String logId) Convenience method to convert from a Flight.Descriptor to a Flight.Ticket.- Parameters:
descriptor- the descriptor to convertlogId- an end-user friendly identification of the ticket should an error occur- Returns:
- a flight ticket that represents the descriptor
-