blob: 3daca38e67928f841757b888531a63e57c76537b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
package de.thedevstack.conversationsplus.services.filetransfer;
/**
*
*/
public enum FileTransferFailureType {
RECOVERABLE(Integer.MAX_VALUE),
LIMITEDRECOVERABLE(5),
NONRECOVERABLE(1);
int maxAttempts;
FileTransferFailureType(int maxAttempts) {
this.maxAttempts = maxAttempts;
}
public boolean isRetryPossible(int attempt) {
return attempt < this.maxAttempts;
}
public int getMaxAttempts() {
return this.maxAttempts;
}
}
|