-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathServer.java
More file actions
executable file
·83 lines (54 loc) · 1.43 KB
/
Server.java
File metadata and controls
executable file
·83 lines (54 loc) · 1.43 KB
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
import java.sql.*;
public class Server {
private String name;
private String address;
private Integer port;
private String username;
private String full_address; /* Used as server path when establishing the connection*/
public Server() {
}
public Server(String name, String address, Integer port, String username) {
this.name = name;
this.address = address;
this.port = port;
this.username = username;
this.full_address = "jdbc:mysql://" + address + ":" + port + "/";
}
public void setName(String name) {
this.name = name;
}
public void setAddress(String address) {
this.address = address;
}
public void setPort(int port) {
this.port = port;
}
public void setUsername(String username) {
this.username = username;
}
public void setFullAddress(String full_address) {
this.full_address = full_address;
}
public String getName() {
return(this.name);
}
public String getAddress() {
return(this.address);
}
public int getPort() {
return(this.port);
}
public String getUsername() {
return(this.username);
}
public String getFullAddress() {
return (this.full_address);
}
/* Created for GUI interface, once all parameters are passed,
* this method passes all of the newly defined variables into
* the full_address variable.
*/
public void updateFullUrl() {
this.full_address = "jdbc:mysql://" + this.address + ":" + this.port + "/";
}
}