diff options
author | Decebal Suiu <decebal.suiu@gmail.com> | 2016-01-04 15:54:13 +0200 |
---|---|---|
committer | Decebal Suiu <decebal.suiu@gmail.com> | 2016-01-04 15:54:13 +0200 |
commit | ce73b9b61e21c5dfb2a5fe36bff2a8173141814c (patch) | |
tree | 331e003ae7f0d04acf78448c30ef7f64369b1eb4 /demo/app/src | |
parent | 479e1cb3dc0659cc33cca86ed78ae1c82cb43cc1 (diff) | |
download | pf4j-ce73b9b61e21c5dfb2a5fe36bff2a8173141814c.tar.gz pf4j-ce73b9b61e21c5dfb2a5fe36bff2a8173141814c.zip |
add HowdyGreeting in demo, a Greeting service implementation declared via Java Service Provider mechanism (META-INF/services)
Diffstat (limited to 'demo/app/src')
-rw-r--r-- | demo/app/src/main/java/ro/fortsoft/pf4j/demo/HowdyGreeting.java | 32 | ||||
-rw-r--r-- | demo/app/src/main/resources/META-INF/services/ro.fortsoft.pf4j.demo.api.Greeting | 1 |
2 files changed, 33 insertions, 0 deletions
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 index 0000000..3d7d24b --- /dev/null +++ b/demo/app/src/main/java/ro/fortsoft/pf4j/demo/HowdyGreeting.java @@ -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 index 0000000..4f8f4ad --- /dev/null +++ b/demo/app/src/main/resources/META-INF/services/ro.fortsoft.pf4j.demo.api.Greeting @@ -0,0 +1 @@ +ro.fortsoft.pf4j.demo.HowdyGreeting |