Package org.springframework.xd.dirt.cluster

Examples of org.springframework.xd.dirt.cluster.ContainerAttributes


    environment.setProperty(CONTAINER_HOST_KEY, customHostname);

    final ContainerServerApplication containerServerApplication = new ContainerServerApplication();
    containerServerApplication.setEnvironment(environment);

    final ContainerAttributes containerAttributes = containerServerApplication.containerAttributes();
    Assert.assertNotNull(containerAttributes);
    Assert.assertEquals(defaultIp, containerAttributes.getIp());
    Assert.assertEquals(defaultHostname, containerAttributes.getHost());
  }
View Full Code Here


public class ContainersControllerIntegrationTests extends AbstractControllerIntegrationTest {

  @Before
  public void before() {
    PageRequest pageable = new PageRequest(0, 20);
    ContainerAttributes attributes1 = new ContainerAttributes("1").setPid(1234).setHost("host1").setIp("127.0.0.1");
    ContainerAttributes attributes2 = new ContainerAttributes("2").setPid(2345).setHost("host2").setIp(
        "192.168.2.1");
    List<DetailedContainer> containers = new ArrayList<DetailedContainer>();
    Container container1 = new Container(attributes1.getId(), attributes1);
    Container container2 = new Container(attributes2.getId(), attributes2);
    containers.add(new DetailedContainer(container1));
    containers.add(new DetailedContainer(container2));
    Page<DetailedContainer> pagedEntity = new PageImpl<DetailedContainer>(containers);
    when(containerRepository.findAllRuntimeContainers(pageable)).thenReturn(pagedEntity);
    when(containerRepository.findOne("1")).thenReturn(container1);
View Full Code Here

    }
    else {
      testMessageBus.setMessageBus(integrationSupport.messageBus());
      TestMessageBusInjection.injectMessageBus(singleNodeApplication, testMessageBus);
    }
    ContainerAttributes attributes = singleNodeApplication.containerContext().getBean(ContainerAttributes.class);
    integrationSupport.addPathListener(Paths.build(Paths.MODULE_DEPLOYMENTS, Paths.ALLOCATED, attributes.getId()),
        deploymentsListener);
  }
View Full Code Here

    if (testMessageBus != null) {
      testMessageBus.cleanup();
      testMessageBus = null;
    }
    if (singleNodeApplication.containerContext().isActive()) {
      ContainerAttributes attribs = singleNodeApplication.containerContext().getBean(ContainerAttributes.class);
      integrationSupport.removePathListener(Paths.build(Paths.MODULE_DEPLOYMENTS, attribs.getId()),
          deploymentsListener);
    }
  }
View Full Code Here

TOP

Related Classes of org.springframework.xd.dirt.cluster.ContainerAttributes

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.