Nouvelles Regex : CLIENT_GET_FILE validée
This commit is contained in:
parent
d17cd59af8
commit
fdcccc1788
@ -3,15 +3,19 @@ package lightcontainer.protocol.rules.reader;
|
|||||||
import lightcontainer.domains.client.Context;
|
import lightcontainer.domains.client.Context;
|
||||||
import lightcontainer.interfaces.ProtocolRepository;
|
import lightcontainer.interfaces.ProtocolRepository;
|
||||||
import lightcontainer.protocol.ProtocolReader;
|
import lightcontainer.protocol.ProtocolReader;
|
||||||
|
import lightcontainer.protocol.StandardizedDefinitions;
|
||||||
import lightcontainer.protocol.rules.writer.GetFileErrorRule;
|
import lightcontainer.protocol.rules.writer.GetFileErrorRule;
|
||||||
import lightcontainer.protocol.rules.writer.RetrieveFileRule;
|
import lightcontainer.protocol.rules.writer.RetrieveFileRule;
|
||||||
import lightcontainer.storage.ReadOnlyFile;
|
import lightcontainer.storage.ReadOnlyFile;
|
||||||
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
|
||||||
|
import static lightcontainer.protocol.StandardizedDefinitions.CLIENT_GET_FILE;
|
||||||
|
|
||||||
public class GetFileRule extends ProtocolReader {
|
public class GetFileRule extends ProtocolReader {
|
||||||
// Constants
|
// Constants
|
||||||
private static final String PATTERN = "^GETFILE ([^ !]{1,20})\r\n$";
|
//"^GETFILE ([^ !]{1,20})\r\n$"
|
||||||
|
private static final String PATTERN = CLIENT_GET_FILE;
|
||||||
private static final String NAME = "GETFILE";
|
private static final String NAME = "GETFILE";
|
||||||
// -- arguments
|
// -- arguments
|
||||||
private static final int FILE_NAME = 0; // Index file name.
|
private static final int FILE_NAME = 0; // Index file name.
|
||||||
|
@ -1 +1,26 @@
|
|||||||
{"unicast_port":8000,"multicast_ip":"224.66.66.1","multicast_port":15502,"network_interface":"lo","tls":true,"storagePath":"C:\\Users\\ledou\\Documents\\ffe","users":[{"name":"aaaaa","password":"$2a$10$Tuh5xmGEy0g26hQO1SHNY.TNy8rY9VCkpzRLP3rlpnVHtwYew4.km","aes_key":"a68CqbWmmf0cuvgvMhm9OC+Y24ut3DY/0WBqtd3nGfU=","files":[{"name":"test.txt","fileNameSalt":"3yLVBqM/zf8CcCFPqdh15Q==","size":301,"iv":"WfokhcAIefnnZnk3sYLjiA==","storage":["lightcontainerSB01"]}]}]}
|
{
|
||||||
|
"unicast_port": 8000,
|
||||||
|
"multicast_ip": "224.66.66.1",
|
||||||
|
"multicast_port": 15502,
|
||||||
|
"network_interface": "lo",
|
||||||
|
"tls": true,
|
||||||
|
"storagePath": "C:\\Users\\ledou\\Documents\\ffe",
|
||||||
|
"users": [
|
||||||
|
{
|
||||||
|
"name": "aaaaa",
|
||||||
|
"password": "$2a$10$Tuh5xmGEy0g26hQO1SHNY.TNy8rY9VCkpzRLP3rlpnVHtwYew4.km",
|
||||||
|
"aes_key": "a68CqbWmmf0cuvgvMhm9OC+Y24ut3DY/0WBqtd3nGfU=",
|
||||||
|
"files": [
|
||||||
|
{
|
||||||
|
"name": "test.txt",
|
||||||
|
"fileNameSalt": "3yLVBqM/zf8CcCFPqdh15Q==",
|
||||||
|
"size": 301,
|
||||||
|
"iv": "WfokhcAIefnnZnk3sYLjiA==",
|
||||||
|
"storage": [
|
||||||
|
"lightcontainerSB01"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user