Package org.pentaho.di.core.service
Interface ServiceProviderInterface<T>
public interface ServiceProviderInterface<T>
-
Method Summary
Modifier and TypeMethodDescriptiondefault T
Provides a factory method to create an instance of the ServiceProvider provides item.default int
Indicate the order in which to use this provider if there are multiple providers for a given servicedefault boolean
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 boolean
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 boolean
Returns a boolean if the PluginServiceLoader should use the java.lang.reflect.Proxy that sets the Thread Context ClassLoader on the service
-
Method Details
-
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
true
indicates 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
true
indicates to use thefactoryCreate
method.
-
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
true
indicates 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)
-