Package messages
Class FilesSizeRequest
java.lang.Object
messages.AbstractMessage
messages.FilesSizeRequest
- All Implemented Interfaces:
Serializable
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 Summary
FieldsModifier and TypeFieldDescriptionprivate longTotal file size in bytes.A list of objects describing files on the server.private intFilled in in response to receiving part of the file.private intIs filled in in response to receiving a part of the file, how many parts are there in total. -
Constructor Summary
ConstructorsConstructorDescriptionFilesSizeRequest(long filesSize) A constructor filled in by the client for a request to the server.FilesSizeRequest(long filesSize, List<FileInfo> listFiles) The constructor used by the server.FilesSizeRequest(long filesSize, List<FileInfo> listFiles, int partNumber, int partsCount) The constructor used by the server. -
Method Summary
-
Field Details
-
filesSize
private long filesSizeTotal file size in bytes. -
listFiles
A list of objects describing files on the server. -
partNumber
private int partNumberFilled in in response to receiving part of the file. -
partsCount
private int partsCountIs 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
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
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
-
getListFiles
-