]> source.dussan.org Git - pf4j.git/commitdiff
add HowdyGreeting in demo, a Greeting service implementation declared via Java Servic...
authorDecebal Suiu <decebal.suiu@gmail.com>
Mon, 4 Jan 2016 13:54:13 +0000 (15:54 +0200)
committerDecebal Suiu <decebal.suiu@gmail.com>
Mon, 4 Jan 2016 13:54:13 +0000 (15:54 +0200)
demo/app/src/main/java/ro/fortsoft/pf4j/demo/HowdyGreeting.java [new file with mode: 0644]
demo/app/src/main/resources/META-INF/services/ro.fortsoft.pf4j.demo.api.Greeting [new file with mode: 0644]

diff --git a/demo/app/src/main/java/ro/fortsoft/pf4j/demo/HowdyGreeting.java b/demo/app/src/main/java/ro/fortsoft/pf4j/demo/HowdyGreeting.java
new file mode 100644 (file)
index 0000000..3d7d24b
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2015 Decebal Suiu
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License 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 ro.fortsoft.pf4j.demo;
+
+import ro.fortsoft.pf4j.demo.api.Greeting;
+
+/**
+ * A Service Implementation (no @Extension) declared via Java Service Provider mechanism (using META-INF/services).
+ *
+ * @author Decebal Suiu
+ */
+public class HowdyGreeting implements Greeting {
+
+    @Override
+    public String getGreeting() {
+        return "Howdy";
+    }
+
+}
diff --git a/demo/app/src/main/resources/META-INF/services/ro.fortsoft.pf4j.demo.api.Greeting b/demo/app/src/main/resources/META-INF/services/ro.fortsoft.pf4j.demo.api.Greeting
new file mode 100644 (file)
index 0000000..4f8f4ad
--- /dev/null
@@ -0,0 +1 @@
+ro.fortsoft.pf4j.demo.HowdyGreeting