diff options
author | Decebal Suiu <decebal.suiu@gmail.com> | 2012-10-16 14:33:48 +0300 |
---|---|---|
committer | Decebal Suiu <decebal.suiu@gmail.com> | 2012-10-16 14:33:48 +0300 |
commit | 9bd850bd57dc1df58f8103024df996d164c5ca0b (patch) | |
tree | 9cd6bf54c69f7b627adcfd26a9e9d861239f5a2d /demo/app/src/main/java/org | |
parent | ef96cc59fda8d665c1065bc1b7a18b5116703865 (diff) | |
download | pf4j-9bd850bd57dc1df58f8103024df996d164c5ca0b.tar.gz pf4j-9bd850bd57dc1df58f8103024df996d164c5ca0b.zip |
prepare for maven central repository
Diffstat (limited to 'demo/app/src/main/java/org')
-rw-r--r-- | demo/app/src/main/java/org/pf4j/demo/Boot.java | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/demo/app/src/main/java/org/pf4j/demo/Boot.java b/demo/app/src/main/java/org/pf4j/demo/Boot.java deleted file mode 100644 index b34af53..0000000 --- a/demo/app/src/main/java/org/pf4j/demo/Boot.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2012 Decebal Suiu - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with - * the License. You may obtain a copy of the License in the LICENSE file, or at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package org.pf4j.demo; - -import java.util.List; - -import org.apache.commons.lang.StringUtils; -import org.pf4j.DefaultPluginManager; -import org.pf4j.ExtensionWrapper; -import org.pf4j.PluginManager; -import org.pf4j.demo.api.Greeting; - -/** - * A boot class that start the demo. - * - * @author Decebal Suiu - */ -public class Boot { - - public static void main(String[] args) { - // print logo - printLogo(); - - // load and start (active/resolved) plugins - final PluginManager pluginManager = new DefaultPluginManager(); - pluginManager.loadPlugins(); - pluginManager.startPlugins(); - - List<ExtensionWrapper<Greeting>> greetings = pluginManager.getExtensions(Greeting.class); - for (ExtensionWrapper<Greeting> greeting : greetings) { - System.out.println(">>> " + greeting.getInstance().getGreeting()); - } - - pluginManager.stopPlugins(); - /* - Runtime.getRuntime().addShutdownHook(new Thread() { - - @Override - public void run() { - pluginManager.stopPlugins(); - } - - }); - */ - } - - private static void printLogo() { - System.out.println(StringUtils.repeat("#", 40)); - System.out.println(StringUtils.center("PF4J-DEMO", 40)); - System.out.println(StringUtils.repeat("#", 40)); - } - -} |