aboutsummaryrefslogtreecommitdiffstats
path: root/jdisc_core/src/main/java/com/yahoo/jdisc/test/NonWorkingOsgiFramework.java
blob: 1b90e8adcfe2ab49694914f3875f904674b5b449 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.jdisc.test;

import com.yahoo.jdisc.application.OsgiFramework;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;

import java.util.Collection;
import java.util.Collections;
import java.util.List;

/**
 * @author Simon Thoresen Hult
 */
public class NonWorkingOsgiFramework implements OsgiFramework {

    @Override
    public List<Bundle> installBundle(String bundleLocation) {
        throw new UnsupportedOperationException();
    }

    @Override
    public void startBundles(List<Bundle> bundles, boolean privileged) {
        throw new UnsupportedOperationException();
    }

    @Override
    public void refreshPackages() {
        throw new UnsupportedOperationException();
    }

    @Override
    public BundleContext bundleContext() {
        return null;
    }

    @Override
    public List<Bundle> bundles() {
        return Collections.emptyList();
    }

    @Override
    public List<Bundle> getBundles(Bundle requestingBundle) {
        return Collections.emptyList();
    }

    @Override
    public void allowDuplicateBundles(Collection<Bundle> bundles) { }

    @Override
    public void start() {

    }

    @Override
    public void stop() {

    }
}