Class SCFileService

java.lang.Object
org.serviceconnector.api.cln.SCService
org.serviceconnector.api.cln.SCFileService

public class SCFileService extends SCService
The Class SCFileService. SCFileService is a remote interface in client API to a file service and provides communication functions. Creating a file service instance for API users should be done by calling SCClient newFileService().
  • Method Details

    • setEchoIntervalSeconds

      public void setEchoIntervalSeconds(int echoIntervalSeconds)
      Sets the echo interval in seconds. Interval in seconds between two subsequent ECHO messages sent by the client to SC. The message is sent only when no message is pending.
      Parameters:
      echoIntervalSeconds - Validation: echoIntervalSeconds > 1 and < 3600
      Example: 360
    • getEchoIntervalSeconds

      public int getEchoIntervalSeconds()
      Gets the echo interval in seconds.
      Returns:
      the echo interval in seconds
    • getPartSize

      public int getPartSize()
      Gets the part size.
      Returns:
      the size of the parts in which message will be broken when it is large
    • setPartSize

      public void setPartSize(int partSize)
      Sets the part size.
      Parameters:
      partSize - the size in which message will be broken when it is large
    • uploadFile

      public void uploadFile(String remoteFileName, InputStream inStream) throws SCServiceException
      Upload file with default operation timeout.
      Parameters:
      remoteFileName - the remote file name to store the file
      inStream - stream to upload
      Throws:
      SCServiceException - create file session to SC failed
      upload file to Server failed
      error message received from SC
    • uploadFile

      public void uploadFile(int operationTimeoutSeconds, String remoteFileName, InputStream inStream) throws SCServiceException
      Upload file.
      Parameters:
      operationTimeoutSeconds - the allowed time in seconds to complete the operation
      remoteFileName - the remote file name to store the file
      inStream - stream to upload
      Throws:
      SCServiceException - create file session to SC failed
      upload file to Server failed
      error message received from SC
    • downloadFile

      public void downloadFile(String remoteFileName, OutputStream outStream) throws SCServiceException
      Download file with default operation timeout.
      Parameters:
      remoteFileName - the remote name of the file
      outStream - the out stream to store download
      Throws:
      SCServiceException - create file session to SC failed
      download file from Server failed
      error message received from SC
    • downloadFile

      public void downloadFile(int operationTimeoutSeconds, String remoteFileName, OutputStream outStream) throws SCServiceException
      Download file.
      Parameters:
      operationTimeoutSeconds - the allowed time in seconds to complete the operation
      remoteFileName - the remote name of the file
      outStream - the out stream to store download
      Throws:
      SCServiceException - create file session to SC failed
      download file from Server failed
      writing to OutputStream failed
      error message received from SC
    • listFiles

      public List<String> listFiles() throws SCServiceException
      List files with default operation timeout.
      Returns:
      the list of files on the remote server
      Throws:
      SCServiceException - list files from Server failed
      error message received from SC
    • listFiles

      public List<String> listFiles(int operationTimeoutSeconds) throws SCServiceException
      List available files on server directory.
      Parameters:
      operationTimeoutSeconds - the allowed time in seconds to complete the operation
      Returns:
      the list of files on the remote server
      Throws:
      SCServiceException - list files from Server failed
      error message received from SC