Package messages

Class FilesSizeRequest

java.lang.Object
messages.AbstractMessage
messages.FilesSizeRequest
All Implemented Interfaces:
Serializable

public class FilesSizeRequest extends AbstractMessage
The descendant class of AbstractMessage, is a Data Transfer Object. If sent by the client, then the constructor with the parameter "1" is used, accepting this the message object server will understand that it is necessary to return a completed response. On the server side, it is used as a response to the client's request for storage capacity, and the response to receiving parts of the files.
See Also:
  • Field Details

    • filesSize

      private long filesSize
      Total file size in bytes.
    • listFiles

      private List<FileInfo> listFiles
      A list of objects describing files on the server.
    • partNumber

      private int partNumber
      Filled in in response to receiving part of the file.
    • partsCount

      private int partsCount
      Is filled in in response to receiving a part of the file, how many parts are there in total.
  • Constructor Details

    • FilesSizeRequest

      public FilesSizeRequest(long filesSize)
      A constructor filled in by the client for a request to the server.
      Parameters:
      filesSize - contains "1".
    • FilesSizeRequest

      public FilesSizeRequest(long filesSize, List<FileInfo> listFiles)
      The constructor used by the server.
      Parameters:
      filesSize - The size of files on the server in bytes.
      listFiles - A list of objects describing files.
    • FilesSizeRequest

      public FilesSizeRequest(long filesSize, List<FileInfo> listFiles, int partNumber, int partsCount)
      The constructor used by the server.
      Parameters:
      filesSize - The size of files on the server in bytes.
      listFiles - A list of objects describing files.
      partNumber - The assigned parcel number.
      partsCount - How many packages are there in total.
  • Method Details