Class ServicePump<Context>

  • Type Parameters:
    Context - Context to pump

    public final class ServicePump<Context>
    extends java.lang.Object
    Class that forwards a context to a service type that consumes said context
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <Result> @NonNull ServiceSpigot<@NonNull Context,​@NonNull Result> through​(@NonNull io.leangen.geantyref.TypeToken<? extends Service<@NonNull Context,​@NonNull Result>> type)
      Specify the service type that the context will be pumped through
      <Result> @NonNull ServiceSpigot<@NonNull Context,​@NonNull Result> through​(@NonNull java.lang.Class<? extends Service<@NonNull Context,​@NonNull Result>> clazz)
      Specify the service type that the context will be pumped through
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • through

        public <Result> @NonNull ServiceSpigot<@NonNull Context,​@NonNull Result> through​(@NonNull io.leangen.geantyref.TypeToken<? extends Service<@NonNull Context,​@NonNull Result>> type)
        Specify the service type that the context will be pumped through
        Type Parameters:
        Result - Result type
        Parameters:
        type - Service type
        Returns:
        Service spigot instance
      • through

        public <Result> @NonNull ServiceSpigot<@NonNull Context,​@NonNull Result> through​(@NonNull java.lang.Class<? extends Service<@NonNull Context,​@NonNull Result>> clazz)
        Specify the service type that the context will be pumped through
        Type Parameters:
        Result - Result type
        Parameters:
        clazz - Service type
        Returns:
        Service spigot instance