Package org.pentaho.di.core.service
Interface ServiceProviderInterface<T>
-
public interface ServiceProviderInterface<T>
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default TfactoryCreate()Provides a factory method to create an instance of the ServiceProvider provides item.default intgetPriority()Indicate the order in which to use this provider if there are multiple providers for a given servicedefault booleanisSingleton()Indicate whether one instance of this service should be created and reused by all clients or if a new instance should be created each time.default booleanuseFactory()Returns a boolean that indicates if the PluginServiceLoader should use the factoryCreate method to build and return the service provided by the provides tag.default booleanuseProxyWrap()Returns a boolean if the PluginServiceLoader should use the java.lang.reflect.Proxy that sets the Thread Context ClassLoader on the service
-
-
-
Method Detail
-
useProxyWrap
default boolean useProxyWrap()
Returns a boolean if the PluginServiceLoader should use the java.lang.reflect.Proxy that sets the Thread Context ClassLoader on the service- Returns:
- A boolean where
trueindicates to proxy wrap
-
useFactory
default boolean useFactory()
Returns a boolean that indicates if the PluginServiceLoader should use the factoryCreate method to build and return the service provided by the provides tag. Iftrue, the factoryCreate method must be implemented. Otherwise, the PluginRegistry will load the class and call newInstance() of the Class> in the provides property of the ServiceLoader annotation.- Returns:
- A boolean where
trueindicates to use thefactoryCreatemethod.
-
factoryCreate
default T factoryCreate()
Provides a factory method to create an instance of the ServiceProvider provides item.- Returns:
- An instance of the provided service
-
isSingleton
default boolean isSingleton()
Indicate whether one instance of this service should be created and reused by all clients or if a new instance should be created each time.- Returns:
- A boolean where
trueindicates that one instance should be created and reused for the lifetime of the application.
-
getPriority
default int getPriority()
Indicate the order in which to use this provider if there are multiple providers for a given service- Returns:
- An int where a higher number is a higher priority (should be used before lower priorities)
-
-