Package org.spongepowered.api.service
Interface ServiceProvider
- All Known Subinterfaces:
- ServiceProvider.GameScoped,- ServiceProvider.ServerScoped
public interface ServiceProvider
Provides various Sponge services.
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic interfaceProvides services that are scoped to aServiceProvider.GameScopedinstance.static interfaceProvides serivces that are scoped to theServiceProvider.ServerScopedEngineonly.
- 
Method SummaryModifier and TypeMethodDescription<T> Optional<T>Provides the service represented by the suppliedClass.<T> Optional<ServiceRegistration<T>>registration(Class<T> serviceClass) Provides theServiceRegistrationfor the suppliedClass.
- 
Method Details- 
provideProvides the service represented by the suppliedClass.- Type Parameters:
- T- The type of service
- Parameters:
- serviceClass- The class
- Returns:
- The service, if one exists
 
- 
registrationProvides theServiceRegistrationfor the suppliedClass.- Type Parameters:
- T- The type of service
- Parameters:
- serviceClass- The class
- Returns:
- The registration, if one exists
 
 
-