diff options
Diffstat (limited to 'sca-java-2.x/contrib/samples/servlet-callback/src/main/java/sample/HelloworldServiceImpl.java')
-rw-r--r-- | sca-java-2.x/contrib/samples/servlet-callback/src/main/java/sample/HelloworldServiceImpl.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sca-java-2.x/contrib/samples/servlet-callback/src/main/java/sample/HelloworldServiceImpl.java b/sca-java-2.x/contrib/samples/servlet-callback/src/main/java/sample/HelloworldServiceImpl.java index 3cb1b8a7d7..a4ae0761e4 100644 --- a/sca-java-2.x/contrib/samples/servlet-callback/src/main/java/sample/HelloworldServiceImpl.java +++ b/sca-java-2.x/contrib/samples/servlet-callback/src/main/java/sample/HelloworldServiceImpl.java @@ -24,10 +24,14 @@ import org.oasisopen.sca.annotation.Service; @Service(HelloworldService.class) public class HelloworldServiceImpl implements HelloworldService { + private ServletCallback callback; + @Callback - private CallbackServlet callback; - - public void sayHello(String name) { + public void setCallback(ServletCallback callback) { + this.callback = callback; + } + + public void sayHello(String name) { callback.sendGreeting("Hello " + name + "!"); } |