aboutsummaryrefslogtreecommitdiffstats
path: root/jdisc_core_test/test_bundles/app-b-priv
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-b-priv
Publish
Diffstat (limited to 'jdisc_core_test/test_bundles/app-b-priv')
-rw-r--r--jdisc_core_test/test_bundles/app-b-priv/.gitignore2
-rw-r--r--jdisc_core_test/test_bundles/app-b-priv/pom.xml39
-rw-r--r--jdisc_core_test/test_bundles/app-b-priv/src/main/java/com/yahoo/jdisc/bundle/ApplicationB.java45
3 files changed, 86 insertions, 0 deletions
diff --git a/jdisc_core_test/test_bundles/app-b-priv/.gitignore b/jdisc_core_test/test_bundles/app-b-priv/.gitignore
new file mode 100644
index 00000000000..3cc25b51fc4
--- /dev/null
+++ b/jdisc_core_test/test_bundles/app-b-priv/.gitignore
@@ -0,0 +1,2 @@
+/pom.xml.build
+/target
diff --git a/jdisc_core_test/test_bundles/app-b-priv/pom.xml b/jdisc_core_test/test_bundles/app-b-priv/pom.xml
new file mode 100644
index 00000000000..efaf189d2c4
--- /dev/null
+++ b/jdisc_core_test/test_bundles/app-b-priv/pom.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>com.yahoo.vespa.jdisc_core</groupId>
+ <artifactId>test_bundles</artifactId>
+ <version>6-SNAPSHOT</version>
+ </parent>
+ <artifactId>app-b-priv</artifactId>
+ <version>6-SNAPSHOT</version>
+ <packaging>bundle</packaging>
+ <name>${project.artifactId}</name>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <X-JDisc-Privileged-Activator>
+ true
+ </X-JDisc-Privileged-Activator>
+ <X-JDisc-Application>
+ com.yahoo.jdisc.bundle.ApplicationB
+ </X-JDisc-Application>
+ <Export-Package>
+ com.yahoo.jdisc.bundle
+ </Export-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/jdisc_core_test/test_bundles/app-b-priv/src/main/java/com/yahoo/jdisc/bundle/ApplicationB.java b/jdisc_core_test/test_bundles/app-b-priv/src/main/java/com/yahoo/jdisc/bundle/ApplicationB.java
new file mode 100644
index 00000000000..777556e0934
--- /dev/null
+++ b/jdisc_core_test/test_bundles/app-b-priv/src/main/java/com/yahoo/jdisc/bundle/ApplicationB.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 ApplicationB implements Application {
+
+ private final CountDownLatch startLatch;
+ private final CountDownLatch stopLatch;
+ private final CountDownLatch destroyLatch;
+
+ @Inject
+ public ApplicationB(@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();
+ }
+}