Package io.fabric8.internal

Examples of io.fabric8.internal.ContainerImpl


            Fabric8JMXPlugin.getLogger().warning(ex);
          return null;
        }
        final Set<ObjectName> queryNames = connection.queryNames(insightObjectName, null);
        for (ObjectName insightObjectName : queryNames) {
          LogQuerySupportMBean logQuerySupportMBean = MBeanServerInvocationHandler.newProxyInstance(connection, insightObjectName, LogQuerySupportMBean.class, true);
          return callback.doWithLogQuerySupportMBean(logQuerySupportMBean);
        }
        return null;
      }
    });
View Full Code Here


        indexer.setCacheDirectory(new File(targetDir(), "mavenIndexer"));
        indexer.start();

        List<Repository> repos = Aether.defaultRepositories();
        repos.add(new Repository("ea.repository.jboss.org", "http://repository.jboss.org/nexus/content/groups/ea"));
        aether = new Aether(Aether.USER_REPOSITORY, repos);
    }
View Full Code Here

        this.xsdDir = xsdDir;
    }

    protected void downloadArtifact(ArtifactDTO artifact, String version) {
        try {
            AetherResult result = aether.resolve(artifact.getGroupId(), artifact.getArtifactId(), version, "jar", null);
            if (result != null) {
                List<File> files = result.getResolvedFiles();
                if (files != null && files.size() > 0) {
                    File file = files.get(0);
                    //for (File file : files) {
                    File newFile = new File(archetypeDir, file.getName());
                    FileInputStream input = new FileInputStream(file);
View Full Code Here

        }
    }

    protected String[] downloadProperties(ArtifactDTO artifact, String version) {
        try {
            AetherResult result = aether.resolve(artifact.getGroupId(), artifact.getArtifactId(), version, "properties", "camelComponent");
            if (result != null) {
                List<File> files = result.getResolvedFiles();
                if (files != null && files.size() > 0) {
                    File file = files.get(0);
                    Properties p = new Properties();
                    p.load(new FileInputStream(file));
                    String comps = p.getProperty("components", "");
View Full Code Here

        indexer.setRepositories(repositories);
        indexer.setCacheDirectory(new File(targetDir(), "mavenIndexer"));
        indexer.start();

        List<Repository> repos = Aether.defaultRepositories();
        repos.add(new Repository("ea.repository.jboss.org", "http://repository.jboss.org/nexus/content/groups/ea"));
        aether = new Aether(Aether.USER_REPOSITORY, repos);
    }
View Full Code Here

    @Test
    public void testStopSingleContainer() throws Exception {
        containers("c1");

        ContainerImpl c1 = newContainer("c1");
        expect(this.fabricService.adapt(CuratorFramework.class)).andReturn(this.curatorFramework).anyTimes();
        expect(this.fabricService.getContainers()).andReturn(new Container[] { c1 });
        this.fabricService.stopContainer(c1, false);

        replay(this.fabricService, this.commandSession);
View Full Code Here

    @Test
    public void testStopNoGlobMatchedContainers() throws Exception {
        containers("d*");

        ContainerImpl c1 = newContainer("c1");
        ContainerImpl c2 = newContainer("c2");
        ContainerImpl c3 = newContainer("c3");
        expect(this.fabricService.getContainers()).andReturn(new Container[] { c1, c3, c2 });
        replay(this.fabricService, this.commandSession);
        this.stop.execute(this.commandSession);
        verify(this.fabricService);
        assertThat(new String(this.result.toByteArray()).trim(),
View Full Code Here

    @Test
    public void testStopAllMatchingContainers() throws Exception {
        // should preserve order
        containers("c1", "c3", "c2");

        ContainerImpl c1 = newContainer("c1");
        ContainerImpl c2 = newContainer("c2");
        ContainerImpl c3 = newContainer("c3");
        expect(this.fabricService.adapt(CuratorFramework.class)).andReturn(this.curatorFramework).anyTimes();
        expect(this.fabricService.getContainers()).andReturn(new Container[] { c1, c3, c2 });
        this.fabricService.stopContainer(c1, false);
        expect(this.fabricService.adapt(CuratorFramework.class)).andReturn(this.curatorFramework).anyTimes();
        expect(this.fabricService.getContainers()).andReturn(new Container[] { c1, c3, c2 });
View Full Code Here

    public void testStopGlobMatchingContainers() throws Exception {
        // should stop c2 once
        // should not touch d1
        containers("c*", "c2");

        ContainerImpl c1 = newContainer("c1");
        ContainerImpl c2 = newContainer("c2");
        ContainerImpl c3 = newContainer("c3");
        ContainerImpl d1 = newContainer("d1");
        expect(this.fabricService.getContainers()).andReturn(new Container[] { c1, c3, c2, d1 }).once();
        expect(this.fabricService.adapt(CuratorFramework.class)).andReturn(this.curatorFramework);
        expect(this.fabricService.getContainers()).andReturn(new Container[] { c1, c3, c2, d1 }).once();
        this.fabricService.stopContainer(c1, false);
        expect(this.fabricService.adapt(CuratorFramework.class)).andReturn(this.curatorFramework);
View Full Code Here

    @Test
    public void testStopSomeMatchingContainers() throws Exception {
        containers("c1", "c2");

        ContainerImpl c1 = newContainer("c1");
        expect(this.fabricService.adapt(CuratorFramework.class)).andReturn(this.curatorFramework);
        expect(this.fabricService.getContainers()).andReturn(new Container[] { c1 }).once();
        this.fabricService.stopContainer(c1, false);
        expect(this.fabricService.adapt(CuratorFramework.class)).andReturn(this.curatorFramework);
        expect(this.fabricService.getContainers()).andReturn(new Container[] { c1 }).once();
View Full Code Here

TOP

Related Classes of io.fabric8.internal.ContainerImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.