aboutsummaryrefslogtreecommitdiffstats
path: root/jdisc_core_test/test_bundles/app-a/src/main/java/com/yahoo/jdisc/bundle
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@yahoo-inc.com>2016-06-15 23:09:44 +0200
committerJon Bratseth <bratseth@yahoo-inc.com>2016-06-15 23:09:44 +0200
commit72231250ed81e10d66bfe70701e64fa5fe50f712 (patch)
tree2728bba1131a6f6e5bdf95afec7d7ff9358dac50 /jdisc_core_test/test_bundles/app-a/src/main/java/com/yahoo/jdisc/bundle
Publish
Diffstat (limited to 'jdisc_core_test/test_bundles/app-a/src/main/java/com/yahoo/jdisc/bundle')
-rw-r--r--jdisc_core_test/test_bundles/app-a/src/main/java/com/yahoo/jdisc/bundle/ApplicationA.java45
1 files changed, 45 insertions, 0 deletions
diff --git a/jdisc_core_test/test_bundles/app-a/src/main/java/com/yahoo/jdisc/bundle/ApplicationA.java b/jdisc_core_test/test_bundles/app-a/src/main/java/com/yahoo/jdisc/bundle/ApplicationA.java
new file mode 100644
index 00000000000..d2a63c1b0e2
--- /dev/null
+++ b/jdisc_core_test/test_bundles/app-a/src/main/java/com/yahoo/jdisc/bundle/ApplicationA.java
@@ -0,0 +1,45 @@
+// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+package com.yahoo.jdisc.bundle;
+
+import com.google.inject.Inject;
+import com.google.inject.name.Named;
+import com.yahoo.jdisc.application.Application;
+
+import java.util.concurrent.CountDownLatch;
+
+/**
+ * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a>
+ */
+public class ApplicationA implements Application {
+
+ private final CountDownLatch startLatch;
+ private final CountDownLatch stopLatch;
+ private final CountDownLatch destroyLatch;
+
+ @Inject
+ public ApplicationA(@Named("Init") CountDownLatch initLatch,
+ @Named("Start") CountDownLatch startLatch,
+ @Named("Stop") CountDownLatch stopLatch,
+ @Named("Destroy") CountDownLatch destroyLatch)
+ {
+ this.startLatch = startLatch;
+ this.stopLatch = stopLatch;
+ this.destroyLatch = destroyLatch;
+ initLatch.countDown();
+ }
+
+ @Override
+ public void start() {
+ startLatch.countDown();
+ }
+
+ @Override
+ public void stop() {
+ stopLatch.countDown();
+ }
+
+ @Override
+ public void destroy() {
+ destroyLatch.countDown();
+ }
+}