summaryrefslogtreecommitdiff
path: root/src/main/java/com/it_jaros/jscanner/PortResult.java
blob: f2463027cbe94595aff3715a4a6b66432dafeda2 (plain) (blame)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package com.it_jaros.jscanner;

import java.io.IOException;

public class PortResult {
    private int port;
    private PortState state;
    private byte[] banner;
    private Exception exception;

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public PortState getState() {
        return state;
    }

    public void setState(PortState state) {
        this.state = state;
    }

    public byte[] getBanner() {
        return banner;
    }

    public void setBanner(byte[] banner) {
        this.banner = banner;
    }

    public void setException(IOException e) {
        exception = e;
    }

    public Exception getException() {
        return exception;
    }

    public static PortResult empty() {
        PortResult portResult = new PortResult();
        portResult.setState(PortState.UNKNOWN);
        return portResult;
    }
}