summaryrefslogtreecommitdiff
path: root/src/main/java/com/it_jaros/jscanner/PortResult.java
blob: be2e11978c2de70f71ec920d6d10d1f76454237d (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 String 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 String getBanner() {
        return banner;
    }

    public void setBanner(String 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;
    }
}