Class ExchangeMarshallerModule

java.lang.Object
io.deephaven.server.arrow.ExchangeMarshallerModule

@Module public class ExchangeMarshallerModule extends Object
A dagger module that provides exchange marshallers and handlers for use by the ArrowFlightUtil DoExchangeMarshaller, loaded using a ServiceLoader constructed with the injected Scheduler, SessionService.ErrorTransformer and BarrageMessageWriter.Factory parameters.

Note, the user of the ExchangeMarshaller set must sort the marshallers according to priority. The set cannot be sorted at our injection point, because there may be multiple @ElementsIntoSet injectors.

  • Constructor Details

    • ExchangeMarshallerModule

      public ExchangeMarshallerModule()
  • Method Details

    • sortMarshallersByPriority

      @Provides public static List<ExchangeMarshaller> sortMarshallersByPriority(@NotNull @NotNull Set<ExchangeMarshaller> marshallers)
      Multiple modules could have injected a marshaller, we must sort the complete list by priority.
      Parameters:
      marshallers - the input set of marshallers
      Returns:
      the marshallers sorted in ascending priority.
    • provideExchangeMarshallers

      @Provides @ElementsIntoSet public static Set<ExchangeMarshaller> provideExchangeMarshallers(Scheduler scheduler, SessionService.ErrorTransformer errorTransformer, io.deephaven.extensions.barrage.BarrageMessageWriter.Factory streamGeneratorFactory)
    • provideRequestHandlers

      @Provides @ElementsIntoSet public static Set<ExchangeRequestHandlerFactory> provideRequestHandlers()