Package org.serviceconnector.api.cln

Examples of org.serviceconnector.api.cln.SCFileService.listFiles()


      sc.setKeepAliveIntervalSeconds(10); // can be set before attach, default 0 -> inactive
      sc.attach(); // attaching client to SC , communication starts

      SCFileService service = sc.newFileService("file-1"); // name of the service to use

      List<String> fileNameList = service.listFiles();
      for (String fileName : fileNameList) {
        System.out.println(fileName);
      }

      File localFile = new File("src/main/resources/uploadContent.txt");
View Full Code Here


    if (service instanceof FileService || service instanceof CascadedFileService) {
      SCClient client = null;
      // try to connect client
      client = connectClientToService(service);
      SCFileService scFileService = client.newFileService(serviceName);
      List<String> fileList = scFileService.listFiles();
      writer.writeStartElement("files");
      for (String fileName : fileList) {
        writer.writeStartElement("file");
        writer.writeCData(fileName);
        writer.writeEndElement();
View Full Code Here

    if (service instanceof FileService || service instanceof CascadedFileService) {
      SCClient client = null;
      // try to connect client
      client = connectClientToService(service);
      SCFileService scFileService = client.newFileService(serviceName);
      List<String> fileList = scFileService.listFiles();
      writer.writeStartElement("files");
      for (String fileName : fileList) {
        if (fileName.startsWith(Constants.LOGS_FILE_NAME)) {
          writer.writeStartElement("file");
          writer.writeCData(fileName);
View Full Code Here

    InputStream inpStream = new FileInputStream(inputFile);
    service.uploadFile(180, remoteFileName, inpStream);
    inpStream.close();

    // list now
    List<String> fileNameList = service.listFiles();
    for (String fileName : fileNameList) {
      testLogger.info(fileName);
    }
    Assert.assertEquals("list is empty", 1, fileNameList.size());
    Assert.assertEquals("filename is not equal", remoteFileName, fileNameList.get(0));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.