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 loadDiscoveryDirectoryProvider
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.discovery.provider.DiscoveryDirectoryProvider
- the client application need not concern itself directly with the defaultNativeDiscovery
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.
-
-
Constructor Summary
Constructors Constructor Description DirectoryProviderDiscoveryStrategy(String[] filenamePatterns, String[] pluginPathFormats)
Create a new native discovery strategy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
discoveryDirectories()
-
Methods inherited from class uk.co.caprica.vlcj.factory.discovery.strategy.BaseNativeDiscoveryStrategy
discover, onFound, onSetPluginPath
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface uk.co.caprica.vlcj.factory.discovery.strategy.NativeDiscoveryStrategy
supported
-
-
-
-
Constructor Detail
-
DirectoryProviderDiscoveryStrategy
public DirectoryProviderDiscoveryStrategy(String[] filenamePatterns, String[] pluginPathFormats)
Create a new native discovery strategy.- Parameters:
filenamePatterns
- filename patterns to search for, as regular expressionspluginPathFormats
- directory name templates used to find the VLC plugin directory, printf style.
-
-