diff options
author | slewis | 2015-05-05 20:47:01 +0000 |
---|---|---|
committer | slewis | 2015-05-05 20:47:01 +0000 |
commit | e818b9dcca08dfff50836dfff532ffaa14fe6da4 (patch) | |
tree | 99f203b67efb479912e55e3dbcfc0938fb407c68 /examples/bundles/com.mycorp.examples.timeservice.consumer.ds/src | |
parent | 92d4bb508f54533a90aa90ee3d1bdde028b9794d (diff) | |
download | org.eclipse.ecf-e818b9dcca08dfff50836dfff532ffaa14fe6da4.tar.gz org.eclipse.ecf-e818b9dcca08dfff50836dfff532ffaa14fe6da4.tar.xz org.eclipse.ecf-e818b9dcca08dfff50836dfff532ffaa14fe6da4.zip |
Enhanced timeservice remote service examples to report undiscovery (e.g.
triggered by host shutdown)
Change-Id: Ie1becf5f12f5237e5b569c5ccdac5f29d95b21e5
Diffstat (limited to 'examples/bundles/com.mycorp.examples.timeservice.consumer.ds/src')
-rw-r--r-- | examples/bundles/com.mycorp.examples.timeservice.consumer.ds/src/com/mycorp/examples/timeservice/consumer/ds/TimeServiceComponent.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/examples/bundles/com.mycorp.examples.timeservice.consumer.ds/src/com/mycorp/examples/timeservice/consumer/ds/TimeServiceComponent.java b/examples/bundles/com.mycorp.examples.timeservice.consumer.ds/src/com/mycorp/examples/timeservice/consumer/ds/TimeServiceComponent.java index 1cfcbe927..cbcb004a6 100644 --- a/examples/bundles/com.mycorp.examples.timeservice.consumer.ds/src/com/mycorp/examples/timeservice/consumer/ds/TimeServiceComponent.java +++ b/examples/bundles/com.mycorp.examples.timeservice.consumer.ds/src/com/mycorp/examples/timeservice/consumer/ds/TimeServiceComponent.java @@ -12,10 +12,15 @@ import com.mycorp.examples.timeservice.ITimeService; public class TimeServiceComponent { + // Called by DS upon ITimeService discovery void bindTimeService(ITimeService timeService) { - // Invoke synchronously - System.out.println("Discovered ITimeService via DS"); + System.out.println("Discovered ITimeService via DS. Instance="+timeService); // Call the service and print out result! System.out.println("Current time is: " + timeService.getCurrentTime()); } + + // Called by DS upon ITimeService undiscovery + void unbindTimeService(ITimeService timeService) { + System.out.println("Undiscovered ITimeService via DS. Instance="+timeService); + } } |