Package io.deephaven.server.session
Interface ActionResolver
- All Known Implementing Classes:
FlightSqlResolver
public interface ActionResolver
-
Method Summary
Modifier and TypeMethodDescriptionvoiddoAction(@Nullable SessionState session, org.apache.arrow.flight.Action action, io.grpc.stub.StreamObserver<org.apache.arrow.flight.Result> observer) Executes the givenaction.booleanhandlesActionType(String type) Returnstrueif this resolver is responsible for handling the actiontype.voidlistActions(@Nullable SessionState session, Consumer<org.apache.arrow.flight.ActionType> visitor) Invokes thevisitorfor the specific action types that this implementation supports for the givensession; it should be the case that all consumed action types returntrueagainsthandlesActionType(String).
-
Method Details
-
listActions
void listActions(@Nullable @Nullable SessionState session, Consumer<org.apache.arrow.flight.ActionType> visitor) Invokes thevisitorfor the specific action types that this implementation supports for the givensession; it should be the case that all consumed action types returntrueagainsthandlesActionType(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
Returnstrueif this resolver is responsible for handling the actiontype. Implementations should prefer to returntrueif 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:
trueif 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)istruefor 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
-