Blame view

src/client/java/com/mumfrey/webprefs/framework/RequestFailureReason.java 514 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package com.mumfrey.webprefs.framework;

public enum RequestFailureReason
{
    UNKNOWN(1),
    BAD_PARAMS(1),
    NO_SESSION(100),
    SERVER_ERROR(3),
    UNAUTHORISED(5),
    THROTTLED(2),
    UUID_MISMATCH(10),
    BAD_DATA(1);

    private final int severity;

    private RequestFailureReason(int severity)
    {
        this.severity = severity;
    }

    public int getSeverity()
    {
        return this.severity;
    }

    public boolean isPermanent()
    {
        return this.severity > 99;
    }
}