Class ServicePump<Context>

java.lang.Object
cloud.commandframework.services.ServicePump<Context>
Type Parameters:
Context - Context to pump

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

    • 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 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