Package org.structr.cloud.transmission

Examples of org.structr.cloud.transmission.PushTransmission


      final App app    = StructrApp.getInstance();
      try (final Tx tx = app.tx()) {

        // create push transmission to be filled later
        final PushTransmission tms = new PushTransmission(username, password, host, port.intValue());

        for (final SchemaNode node : app.nodeQuery(SchemaNode.class).getAsList()) {

          if (isFalseOrNull(node.getProperty(SchemaNode.isBuiltinType))) {
            tms.getExportSet().add(node);
          }
        }

        for (final SchemaRelationship rel : app.relationshipQuery(SchemaRelationship.class).getAsList()) {
          tms.getExportSet().add(rel);
        }

        // push schema
        CloudService.doRemote(tms, new WebsocketProgressListener(getWebSocket(), key));
View Full Code Here


      try (final Tx tx = app.tx()) {

        final NodeInterface entity = app.nodeQuery().andName(name).getFirst();
        if (entity != null && entity instanceof Syncable) {

          CloudService.doRemote(new PushTransmission((Syncable)entity, true, "admin", "admin", host, 54555), new LoggingListener());
        }
      }
    }
  }
View Full Code Here

            if (recursiveSource != null) {

              recursive = "true".equals(recursiveSource.toString());
            }

            CloudService.doRemote(new PushTransmission((Syncable)root, recursive, username, password, host, port.intValue()), new WebsocketProgressListener(getWebSocket(), key));

          } else {

            getWebSocket().send(MessageBuilder.status().code(400).message("Entity with ID " + sourceId + " cannot be synced.").build(), true);
          }
View Full Code Here

TOP

Related Classes of org.structr.cloud.transmission.PushTransmission

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.