Package net.kuujo.vertigo.platform.impl

Examples of net.kuujo.vertigo.platform.impl.DefaultPlatformManager


  public DefaultNode(String address, Vertx vertx, Container container) {
    Args.checkUriScheme(address, "%s is not a valid node address. Node addresses must be alpha-numeric, begin with a letter, and may contain the following symbols: -.+", address);
    this.address = address;
    this.vertx = vertx;
    this.platform = new DefaultPlatformManager(vertx, container);
  }
View Full Code Here


  public void start(final Future<Void> startResult) {
    boolean localOnly = container.config().getBoolean("local", false);
    String clusterName = container.config().getString("cluster", "vertigo");
    String groupName = container.config().getString("group", "DEFAULT");
    String nodeAddress = container.config().getString("node", Addresses.createUniqueAddress());
    PlatformManager platform = new DefaultPlatformManager(vertx, container);
    ClusterListener listener = new ClusterListenerFactory(vertx).createClusterListener(localOnly);
    ClusterData data = new ClusterDataFactory(vertx).createClusterData(localOnly);
    cluster = new DefaultClusterManager(clusterName, vertx, new ContextManager(vertx), platform, listener, data);
    group = new DefaultGroupManager(String.format("%s.%s", clusterName, groupName), clusterName, vertx, new ContextManager(vertx), platform, listener, data);
    node = new DefaultNodeManager(String.format("%s.%s.%s", clusterName, groupName, nodeAddress), String.format("%s.%s", clusterName, groupName), clusterName, vertx, new ContextManager(vertx), platform, listener, data);
View Full Code Here

    System.setProperty("vertx.mods", "src/test/resources/test-mods");
  }

  @Test
  public void testGetModules() {
    PlatformManager platform = new DefaultPlatformManager(vertx, container);
    platform.getModuleInfo(new Handler<AsyncResult<Collection<ModuleInfo>>>() {
      @Override
      public void handle(AsyncResult<Collection<ModuleInfo>> result) {
        if (result.failed()) {
          assertTrue(result.cause().getMessage(), result.succeeded());
        } else {
View Full Code Here

    });
  }

  @Test
  public void testGetModule() {
    PlatformManager platform = new DefaultPlatformManager(vertx, container);
    platform.getModuleInfo("net.kuujo~test-mod-1~1.0", new Handler<AsyncResult<ModuleInfo>>() {
      @Override
      public void handle(AsyncResult<ModuleInfo> result) {
        if (result.failed()) {
          assertTrue(result.cause().getMessage(), result.succeeded());
        } else {
View Full Code Here

  }

  @Test
  public void testZipInstallModule() {
    System.setProperty("vertx.mods", "src/test/resources/test-mods");
    final PlatformManager sourcePlatform = new DefaultPlatformManager(vertx, container);
    vertx.fileSystem().mkdirSync("src/test/resources/server-mods", true);
    System.setProperty("vertx.mods", "src/test/resources/server-mods");
    final PlatformManager targetPlatform = new DefaultPlatformManager(vertx, container);
    System.setProperty("vertx.mods", "src/test/resources/test-mods");
    sourcePlatform.zipModule("net.kuujo~test-mod-1~1.0", new Handler<AsyncResult<String>>() {
      @Override
      public void handle(AsyncResult<String> result) {
        if (result.failed()) {
          assertTrue(result.cause().getMessage(), result.succeeded());
        } else {
          assertTrue(result.succeeded());
          targetPlatform.installModule(result.result(), new Handler<AsyncResult<Void>>() {
            @Override
            public void handle(AsyncResult<Void> result) {
              if (result.failed()) {
                assertTrue(result.cause().getMessage(), result.succeeded());
              } else {
View Full Code Here

TOP

Related Classes of net.kuujo.vertigo.platform.impl.DefaultPlatformManager

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.