Package cloud.commandframework.services
Class ServicePump<Context>
- java.lang.Object
-
- cloud.commandframework.services.ServicePump<Context>
-
- Type Parameters:
Context- Context to pump
public final class ServicePump<Context> extends java.lang.ObjectClass that forwards a context to a service type that consumes said context
-
-
Method Summary
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
-
-
-
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
-
-