Package io.deephaven.server.session
Interface ActionResolver
- All Known Implementing Classes:
FlightSqlResolver
public interface ActionResolver
-
Method Summary
Modifier and TypeMethodDescriptionvoid
doAction
(@Nullable SessionState session, org.apache.arrow.flight.Action action, io.grpc.stub.StreamObserver<org.apache.arrow.flight.Result> observer) Executes the givenaction
.boolean
handlesActionType
(String type) Returnstrue
if this resolver is responsible for handling the actiontype
.void
listActions
(@Nullable SessionState session, Consumer<org.apache.arrow.flight.ActionType> visitor) Invokes thevisitor
for the specific action types that this implementation supports for the givensession
; it should be the case that all consumed action types returntrue
againsthandlesActionType(String)
.
-
Method Details
-
listActions
void listActions(@Nullable @Nullable SessionState session, Consumer<org.apache.arrow.flight.ActionType> visitor) Invokes thevisitor
for the specific action types that this implementation supports for the givensession
; it should be the case that all consumed action types returntrue
againsthandlesActionType(String)
. UnlikehandlesActionType(String)
, the implementations should not invoke the visitor for action types in their domain that they do not implement.This is called in the context of
ActionRouter.listActions(SessionState, Consumer)
to allow flight consumers to understand the capabilities of this flight service.- Parameters:
session
- the sessionvisitor
- the visitor
-
handlesActionType
Returnstrue
if this resolver is responsible for handling the actiontype
. Implementations should prefer to returntrue
if they know the action type is in their domain even if they don't implement it; this allows them to provide a more specific error message for unimplemented action types.This is used in support of routing in
ActionRouter.doAction(SessionState, Action, StreamObserver)
calls.- Parameters:
type
- the action type- Returns:
true
if this resolver handles the action type
-
doAction
void doAction(@Nullable @Nullable SessionState session, org.apache.arrow.flight.Action action, io.grpc.stub.StreamObserver<org.apache.arrow.flight.Result> observer) Executes the givenaction
. Should only be called ifhandlesActionType(String)
istrue
for the givenaction
.This is called in the context of
ActionRouter.doAction(SessionState, Action, StreamObserver)
to allow flight consumers to execute an action against this flight service.- Parameters:
session
- the sessionaction
- the actionobserver
- the observer
-