summaryrefslogtreecommitdiffstats
path: root/jdisc_core_test/test_bundles/my-guice-module/src/main/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'jdisc_core_test/test_bundles/my-guice-module/src/main/java/com')
-rw-r--r--jdisc_core_test/test_bundles/my-guice-module/src/main/java/com/yahoo/jdisc/bundle/MyGuiceModule.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/jdisc_core_test/test_bundles/my-guice-module/src/main/java/com/yahoo/jdisc/bundle/MyGuiceModule.java b/jdisc_core_test/test_bundles/my-guice-module/src/main/java/com/yahoo/jdisc/bundle/MyGuiceModule.java
new file mode 100644
index 00000000000..62f98f74b00
--- /dev/null
+++ b/jdisc_core_test/test_bundles/my-guice-module/src/main/java/com/yahoo/jdisc/bundle/MyGuiceModule.java
@@ -0,0 +1,29 @@
+// 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.AbstractModule;
+import com.google.inject.Inject;
+import com.google.inject.name.Named;
+
+import java.util.concurrent.CountDownLatch;
+
+/**
+ * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a>
+ */
+public class MyGuiceModule extends AbstractModule {
+
+ private final CountDownLatch configLatch;
+
+ @Inject
+ public MyGuiceModule(@Named("Init") CountDownLatch initLatch,
+ @Named("Config") CountDownLatch configLatch)
+ {
+ this.configLatch = configLatch;
+ initLatch.countDown();
+ }
+
+ @Override
+ protected void configure() {
+ configLatch.countDown();
+ }
+}