Package cloud.commandframework.services
Class ServicePump<Context>
java.lang.Object
cloud.commandframework.services.ServicePump<Context>
- Type Parameters:
Context- Context to pump
Class that forwards a context to a service type that consumes said context
-
Method Summary
Modifier and TypeMethodDescription<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>Specify the service type that the context will be pumped through
-
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
-