Last active
July 31, 2019 19:30
-
-
Save josiahhaswell/9ae0acd7322bef7e31b2bba81c8c1216 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface PluginManager { | |
/** | |
* | |
* @param filter | |
* @return the set of plugins for which the filter returns true | |
*/ | |
List<Plugin> list(Predicate<Plugin> filter); | |
/** Wait until all pending deployments have been deployed */ | |
void waitForStartup(); | |
/** @return the number of plugins waiting to be deployed */ | |
int pendingDeploymentCount(); | |
/** | |
* Retrieve the plugin at the given coordinate | |
* | |
* @param coordinate | |
* @return | |
*/ | |
Plugin lookup(PluginCoordinate coordinate) throws PluginNotFoundException; | |
/** | |
* @param event | |
* @param mode | |
* @param <T> | |
*/ | |
<T> void dispatchAll(Event<T> event, Event.Mode mode); | |
/** | |
* @param event | |
* @param mode | |
* @param targets | |
* @param <T> | |
*/ | |
<T> void dispatch(Event<T> event, Event.Mode mode, PluginCoordinate... targets); | |
/** @return */ | |
List<Plugin> list(); | |
/** | |
* @param items | |
* @return | |
*/ | |
List<Plugin> list(List<PluginCoordinate> items) throws PluginNotFoundException; | |
/** @return */ | |
Path getPluginDirectory(); | |
/** @return the data directory for sunshower::kernel */ | |
Path getDataDirectory(); | |
/** | |
* @param coordinate the plugin to retrieve the data directory from | |
* @return the data directory for the given plugin | |
*/ | |
Path getDataDirectory(PluginCoordinate coordinate); | |
/** | |
* @param coordinate | |
* @return | |
*/ | |
Path getPluginDirectory(PluginCoordinate coordinate); | |
/** Trigger rescan for plugin */ | |
void rescan(); | |
void register(Plugin plugin); | |
String getNativeId(PluginCoordinate coordinate); | |
Plugin.State getState(PluginCoordinate coordinate); | |
void setState(PluginCoordinate coordinate, Plugin.State state); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment