no message
This commit is contained in:
@@ -192,12 +192,6 @@ public abstract class RepositoryServer<D extends Database> {
|
|||||||
case Ping:
|
case Ping:
|
||||||
Ping();
|
Ping();
|
||||||
break;
|
break;
|
||||||
case ReadFile:
|
|
||||||
ReadFile();
|
|
||||||
break;
|
|
||||||
case SendFile:
|
|
||||||
SendFile();
|
|
||||||
break;
|
|
||||||
case ReceiveFile:
|
case ReceiveFile:
|
||||||
ReceiveFile();
|
ReceiveFile();
|
||||||
break;
|
break;
|
||||||
@@ -311,16 +305,10 @@ public abstract class RepositoryServer<D extends Database> {
|
|||||||
};
|
};
|
||||||
return pingPass.Do();
|
return pingPass.Do();
|
||||||
}
|
}
|
||||||
void ReadFile() throws Exception {
|
|
||||||
response = new ServerExchangeUnit_2021(ServerCode.OK, "", Utils.ReadAllText(new File(request.arg)));
|
|
||||||
}
|
|
||||||
void ReceiveFile() throws Exception {
|
void ReceiveFile() throws Exception {
|
||||||
File file = new File(request.arg);
|
File file = new File(request.arg);
|
||||||
response.object = file.exists() ? Utils_.fileToBytes(file) : null;
|
response.object = file.exists() ? Utils_.fileToBytes(file) : null;
|
||||||
}
|
}
|
||||||
void SendFile() throws Exception {
|
|
||||||
request.Unpack(); //распаковка идет по его аргу-пути назначения
|
|
||||||
}
|
|
||||||
void Email() throws Exception {
|
void Email() throws Exception {
|
||||||
Email((EmailMessage) request.object, request.arg);
|
Email((EmailMessage) request.object, request.arg);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,8 +3,6 @@ public enum ServerCode {
|
|||||||
Undefined,
|
Undefined,
|
||||||
TestCode,
|
TestCode,
|
||||||
Ping,
|
Ping,
|
||||||
ReadFile,
|
|
||||||
SendFile,
|
|
||||||
ReceiveFile,
|
ReceiveFile,
|
||||||
//--
|
//--
|
||||||
CheckSubscriberRole,
|
CheckSubscriberRole,
|
||||||
|
|||||||
Reference in New Issue
Block a user