|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.bukkit.plugin.SimpleServicesManager
public class SimpleServicesManager
A simple services manager.
Constructor Summary | |
---|---|
SimpleServicesManager()
|
Method Summary | ||
---|---|---|
Set<Class<?>> |
getKnownServices()
Get a list of known services. |
|
|
getRegistration(Class<T> service)
Queries for a provider registration. |
|
|
getRegistrations(Class<T> service)
Get registrations of providers for a service. |
|
List<RegisteredServiceProvider<?>> |
getRegistrations(Plugin plugin)
Get registrations of providers for a plugin. |
|
|
isProvidedFor(Class<T> service)
Returns whether a provider has been registered for a service. |
|
|
load(Class<T> service)
Queries for a provider. |
|
|
register(Class<T> service,
T provider,
Plugin plugin,
ServicePriority priority)
Register a provider of a service. |
|
void |
unregister(Class<?> service,
Object provider)
Unregister a particular provider for a particular service. |
|
void |
unregister(Object provider)
Unregister a particular provider. |
|
void |
unregisterAll(Plugin plugin)
Unregister all the providers registered by a particular plugin. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleServicesManager()
Method Detail |
---|
public <T> void register(Class<T> service, T provider, Plugin plugin, ServicePriority priority)
register
in interface ServicesManager
T
- Providerservice
- service classprovider
- provider to registerplugin
- plugin with the providerpriority
- priority of the providerpublic void unregisterAll(Plugin plugin)
unregisterAll
in interface ServicesManager
plugin
- The pluginpublic void unregister(Class<?> service, Object provider)
unregister
in interface ServicesManager
service
- The service interfaceprovider
- The service provider implementationpublic void unregister(Object provider)
unregister
in interface ServicesManager
provider
- The service provider implementationpublic <T> T load(Class<T> service)
load
in interface ServicesManager
T
- The service interfaceservice
- The service interface
public <T> RegisteredServiceProvider<T> getRegistration(Class<T> service)
getRegistration
in interface ServicesManager
T
- The service interfaceservice
- The service interface
public List<RegisteredServiceProvider<?>> getRegistrations(Plugin plugin)
getRegistrations
in interface ServicesManager
plugin
- The plugin
public <T> List<RegisteredServiceProvider<T>> getRegistrations(Class<T> service)
getRegistrations
in interface ServicesManager
T
- The service interfaceservice
- The service interface
public Set<Class<?>> getKnownServices()
getKnownServices
in interface ServicesManager
public <T> boolean isProvidedFor(Class<T> service)
isProvidedFor
in interface ServicesManager
T
- serviceservice
- service to check
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |