Skip to content

Server Extension Types

Myron Scott edited this page Nov 23, 2016 · 1 revision

There are now 3 types of server extensions that can be added to the server implementation.

Normal plugin

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>

Builtin

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

Extended Configuration

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.

Clone this wiki locally