-
Notifications
You must be signed in to change notification settings - Fork 0
/
ConnectionStatus.java
131 lines (117 loc) · 2.13 KB
/
ConnectionStatus.java
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
/*
* Department of Computer Science, University at Buffalo
*
* CSE 589 Project - 1
*
* Authors: Sharath Chandrashekhara - [email protected]
* Sanket Kulkarni - [email protected]
*
* Date: 14th October, 2012
*
* This is file contains Helper utility functions for input validation
*
*/
import java.net.Socket;
public class ConnectionStatus {
// Variables related to hold connection status
private int connectionID;
private String ip, hostname;
private int localPort, remotePort;
private Socket clientSocket;
/**
* Gets the connection id.
*
* @return the connection id
*/
public int getConnectionID() {
return connectionID;
}
/**
* Sets the connection id.
*
* @param connectionID the new connection id
*/
public void setConnectionID(int connectionID) {
this.connectionID = connectionID;
}
/**
* Gets the ip.
*
* @return the ip
*/
public String getIp() {
return ip;
}
/**
* Sets the ip.
*
* @param ip the new ip
*/
public void setIp(String ip) {
this.ip = ip;
}
/**
* Gets the hostname.
*
* @return the hostname
*/
public String getHostname() {
return hostname;
}
/**
* Sets the hostname.
*
* @param hostname the new hostname
*/
public void setHostname(String hostname) {
this.hostname = hostname;
}
/**
* Gets the localprt.
*
* @return the localprt
*/
public int getLocalprt() {
return localPort;
}
/**
* Sets the localprt.
*
* @param localPort the new localprt
*/
public void setLocalprt(int localPort) {
this.localPort = localPort;
}
/**
* Gets the remoteport.
*
* @return the remoteport
*/
public int getRemoteport() {
return remotePort;
}
/**
* Sets the remoteport.
*
* @param remotePort the new remoteport
*/
public void setRemoteport(int remotePort) {
this.remotePort = remotePort;
}
/**
* Gets the client socket.
*
* @return the client socket
*/
public Socket getClientSocket() {
return clientSocket;
}
/**
* Sets the client socket.
*
* @param clientSocket the new client socket
*/
public void setClientSocket(Socket clientSocket) {
this.clientSocket = clientSocket;
}
}