Class DirectoryProviderDiscoveryStrategy

java.lang.Object
uk.co.caprica.vlcj.factory.discovery.strategy.BaseNativeDiscoveryStrategy
uk.co.caprica.vlcj.factory.discovery.provider.DirectoryProviderDiscoveryStrategy
All Implemented Interfaces:
NativeDiscoveryStrategy
Direct Known Subclasses:
LinuxNativeDiscoveryStrategy, OsxNativeDiscoveryStrategy, WindowsNativeDiscoveryStrategy

public abstract class DirectoryProviderDiscoveryStrategy extends BaseNativeDiscoveryStrategy
Implementation of a native discovery strategy that searches a list of well-known directories.

The standard ServiceLoader mechanism is used to load DiscoveryDirectoryProvider instances that will provide the lists of directories to search.

By using service loader, a client application can easily add their own search directories simply by adding their own implementation of a discovery directory provider to the run-time classpath, and adding/registering their provider class in META-INF/services/uk.co.caprica.vlcj.factory.discovery.provider.DiscoveryDirectoryProvider - the client application need not concern itself directly with the default NativeDiscovery component.

Provider implementations have a priority. All of the standard provider implementations have a priority < 0, see DiscoveryProviderPriority. A client application with its own provider implementations can return a priority value as appropriate to ensure their own provider is used before or after the other implementations.