-
Notifications
You must be signed in to change notification settings - Fork 25
Server Extension Types
There are now 3 types of server extensions that can be added to the server implementation.
plugin defined xml configuration, exposed to entities via ServiceRegistry
defined in META-INF/services/org.terracotta.config.service.ServiceConfigParser
with config
<plugins>
<service>
<custom config tags/>
</service>
</plugins>
no xml configuration, only one instance in the system, exposed to entities via ServiceRegistry
defined in META-INF/services/org.terracotta.entity.ServiceProvider
no config but the ServiceProvider must be annotated with @BuiltinService
in order to be loaded
plugin defined xml configuration, not exposed to entities but to ServiceProviders in ServiceProvider.initialize()
via the PlatformConfiguration
object
defined in META-INF/services/org.terracotta.config.service.ExtendedConfigParser
<plugins>
<config>
<custom tags/>
</config>
</plugins>
These objects are accessible via type in ServiceProvider.initialize()
by calling PlatformConfiguration.getExtendedConfiguration(Class<T> type)
.
Any custom types accessed this way must be annotated with @CommonComponent
or placed in the plugins/api directory if defined in the plugin just like when exposing service interfaces to entities.