Examples of newFileService()


Examples of org.serviceconnector.api.cln.SCClient.newFileService()

    try {
      sc.setMaxConnections(20); // can be set before attach, default 100 Connections
      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);
      }
View Full Code Here

Examples of org.serviceconnector.api.cln.SCClient.newFileService()

    FileOutputStream dstStream = null;
    SCClient client = null;
    try {
      // try to connect client
      client = connectClientToService(service);
      SCFileService scFileService = client.newFileService(service.getName());
      dstStream = new FileOutputStream(dstFile);
      scFileService.downloadFile(remoteFile, dstStream);
      writer.writeStartElement("message");
      writer.writeCharacters(dstFile.getName() + "  " + status);
      writer.writeEndElement();
View Full Code Here

Examples of org.serviceconnector.api.cln.SCClient.newFileService()

    this.writeBean(writer, service);
    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);
View Full Code Here

Examples of org.serviceconnector.api.cln.SCClient.newFileService()

    this.writeBean(writer, service);
    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");
View Full Code Here

Examples of org.serviceconnector.api.cln.SCClient.newFileService()

    FileOutputStream dstStream = null;
    SCClient client = null;
    try {
      // try to connect client
      client = connectClientToService(service);
      SCFileService scFileService = client.newFileService(service.getName());
      dstStream = new FileOutputStream(dstFile);
      scFileService.downloadFile(remoteFile, dstStream);
      writer.writeStartElement("message");
      writer.writeCharacters(dstFile.getName() + "  " + status);
      writer.writeEndElement();
View Full Code Here

Examples of org.serviceconnector.api.cln.SCClient.newFileService()

      sc.setMaxConnections(20);
      sc.setKeepAliveIntervalSeconds(30);
      sc.attach();

      LOGGER.info("FileUploader attached to: " + hostToConnect + ":" + portToConnect + " " + conType + " - " + serviceName);
      SCFileService service = sc.newFileService(serviceName);

      switch (function) {
      case LIST:
        list(service);
        break;
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.