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 package net.sf.hermesftp.cmd;
26
27 /***
28 * Wraps the connection parameter of the data channel into a single object.
29 *
30 * @author Behnke
31 */
32 public class DataChannelInfo {
33
34 private String address;
35
36 private int port;
37
38 private int protocolIdx;
39
40 /***
41 * Constructor.
42 *
43 * @param addr The IP address.
44 * @param port The port.
45 */
46 public DataChannelInfo(String addr, int port) {
47 this(addr, port, 1);
48 }
49
50 /***
51 * Constructor.
52 *
53 * @param addr The IP address.
54 * @param port The port.
55 * @param protocolIdx The protocol index (IPv4, IPv6)
56 */
57 public DataChannelInfo(String addr, int port, int protocolIdx) {
58 super();
59 this.address = addr;
60 this.port = port;
61 this.protocolIdx = protocolIdx;
62 }
63
64 /***
65 * Getter method for <code>protocolIdx</code>.
66 *
67 * @return The property <code>protocolIdx</code>.
68 */
69 public int getProtocolIdx() {
70 return protocolIdx;
71 }
72
73 /***
74 * Setter method for <code>protocolIdx</code>.
75 *
76 * @param protocolIdx the protocolIdx to set
77 */
78 public void setProtocolIdx(int protocolIdx) {
79 this.protocolIdx = protocolIdx;
80 }
81
82 /***
83 * Getter method for <code>address</code>.
84 *
85 * @return The property <code>address</code>.
86 */
87 public String getAddress() {
88 return address;
89 }
90
91 /***
92 * Setter method for <code>address</code>.
93 *
94 * @param address the address to set
95 */
96 public void setAddress(String address) {
97 this.address = address;
98 }
99
100 /***
101 * Getter method for <code>port</code>.
102 *
103 * @return The property <code>port</code>.
104 */
105 public int getPort() {
106 return port;
107 }
108
109 /***
110 * Setter method for <code>port</code>.
111 *
112 * @param port the port to set
113 */
114 public void setPort(int port) {
115 this.port = port;
116 }
117
118 }