summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorDecebal Suiu <decebal.suiu@gmail.com>2019-06-20 10:22:56 +0300
committerGitHub <noreply@github.com>2019-06-20 10:22:56 +0300
commit36995ea486bdcf720f9403c05dbe6c84c3dbb1fa (patch)
treec729cf62cb72ef6728029ec5651f5fe81c1551b1 /README.md
parentf337e1bcb72dc82a84d49b3d09f85a678b1b6dc4 (diff)
downloadpf4j-36995ea486bdcf720f9403c05dbe6c84c3dbb1fa.tar.gz
pf4j-36995ea486bdcf720f9403c05dbe6c84c3dbb1fa.zip
Update README.md
Diffstat (limited to 'README.md')
-rw-r--r--README.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/README.md b/README.md
index 7bdf040..cbde353 100644
--- a/README.md
+++ b/README.md
@@ -33,7 +33,7 @@ Also, PF4J can be used in web applications. For my web applications when I want
Components
-------------------
- **Plugin** is the base class for all plugins types. Each plugin is loaded into a separate class loader to avoid conflicts.
-- **PluginManager** is used for all aspects of plugins management (loading, starting, stopping). You can use a built-in implementation as `DefaultPluginManager`, `JarPluginManager` or you can implement a custom plugin manager starting from `AbstractPluginManager` (implement only factory methods).
+- **PluginManager** is used for all aspects of plugins management (loading, starting, stopping). You can use a built-in implementation as `JarPluginManager`, `ZipPluginManager`, `DefaultPluginManager` (it's a `JarPluginManager` + `ZipPluginManager`) or you can implement a custom plugin manager starting from `AbstractPluginManager` (implement only factory methods).
- **PluginLoader** loads all information (classes) needed by a plugin.
- **ExtensionPoint** is a point in the application where custom code can be invoked. It's a java interface marker.
Any java interface or abstract class can be marked as an extension point (implements `ExtensionPoint` interface).
@@ -61,7 +61,7 @@ Create an extension using `@Extension` annotation:
```java
@Extension
-public static class WelcomeGreeting implements Greeting {
+public class WelcomeGreeting implements Greeting {
public String getGreeting() {
return "Welcome";
@@ -116,8 +116,8 @@ Plugin-Provider: Decebal Suiu
Plugin-Version: 0.0.1
```
-In above manifest I described a plugin with id `welcome-plugin` (mandatory), with class `org.pf4j.demo.welcome.WelcomePlugin` (optional), with version `0.0.1` (mandatory) and with dependencies
-to plugins `x, y, z` (optional).
+In above manifest I described a plugin with id `welcome-plugin` (mandatory attribute), with class `org.pf4j.demo.welcome.WelcomePlugin` (optional attribute), with version `0.0.1` (mandatory attribute) and with dependencies
+to plugins `x, y, z` (optional attribute).
Now you can play with plugins and extensions in your code:
@@ -126,7 +126,7 @@ public static void main(String[] args) {
...
// create the plugin manager
- PluginManager pluginManager = new DefaultPluginManager(); // or "new JarPluginManager()"
+ PluginManager pluginManager = new JarPluginManager(); // or "new ZipPluginManager() / new DefaultPluginManager()"
// start and load all plugins of application
pluginManager.loadPlugins();