public class FileReceiver extends Object
Protocol is to receive a file-create followed by 1 or more file-chunk messages that are all
linked via the correlation id. Messages are encoded in ByteOrder.LITTLE_ENDIAN.
The chunk size if best determined by Publication.maxPayloadLength() minus header for the chunk.
file-create
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Version | +---------------------------------------------------------------+ | Message Type = 1 | +---------------------------------------------------------------+ | Correlation ID | | | +---------------------------------------------------------------+ | File Length | | | +---------------------------------------------------------------+ | File Name Length | +---------------------------------------------------------------+ | File Name ... ... | +---------------------------------------------------------------+file-chunk
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Version | +---------------------------------------------------------------+ | Message Type = 2 | +---------------------------------------------------------------+ | Correlation ID | | | +---------------------------------------------------------------+ | Chunk Offset | | | +---------------------------------------------------------------+ | Chunk Length | | | +---------------------------------------------------------------+ | Chunk Payload ... ... | +---------------------------------------------------------------+* @see FileSender
| Modifier and Type | Method and Description |
|---|---|
static void |
main(String[] args)
Main method for launching the process.
|
public static void main(String[] args)
args - passed to the process.Copyright © 2014-2023 Real Logic Limited. All Rights Reserved.