1 |
| |
2 |
| |
3 |
| |
4 |
| |
5 |
| |
6 |
| |
7 |
| |
8 |
| |
9 |
| |
10 |
| |
11 |
| |
12 |
| |
13 |
| |
14 |
| |
15 |
| |
16 |
| |
17 |
| |
18 |
| package javax.mail; |
19 |
| |
20 |
| |
21 |
| |
22 |
| |
23 |
| public class Provider { |
24 |
| |
25 |
| |
26 |
| |
27 |
| public static class Type { |
28 |
| |
29 |
| |
30 |
| |
31 |
| public static final Type STORE = new Type(); |
32 |
| |
33 |
| |
34 |
| |
35 |
| |
36 |
| public static final Type TRANSPORT = new Type(); |
37 |
| |
38 |
0
| private Type() {
|
39 |
| } |
40 |
| } |
41 |
| |
42 |
| private final String className; |
43 |
| private final String protocol; |
44 |
| private final Type type; |
45 |
| private final String vendor; |
46 |
| private final String version; |
47 |
| |
48 |
0
| Provider(String protocol, String className, Type type, String vendor, String version) {
|
49 |
0
| this.protocol = protocol;
|
50 |
0
| this.className = className;
|
51 |
0
| this.type = type;
|
52 |
0
| this.vendor = vendor;
|
53 |
0
| this.version = version;
|
54 |
| } |
55 |
| |
56 |
0
| public String getClassName() {
|
57 |
0
| return className;
|
58 |
| } |
59 |
| |
60 |
0
| public String getProtocol() {
|
61 |
0
| return protocol;
|
62 |
| } |
63 |
| |
64 |
0
| public Type getType() {
|
65 |
0
| return type;
|
66 |
| } |
67 |
| |
68 |
0
| public String getVendor() {
|
69 |
0
| return vendor;
|
70 |
| } |
71 |
| |
72 |
0
| public String getVersion() {
|
73 |
0
| return version;
|
74 |
| } |
75 |
| |
76 |
0
| public String toString() {
|
77 |
0
| return "protocol="
|
78 |
| + protocol |
79 |
| + "; type=" |
80 |
| + type |
81 |
| + "; class=" |
82 |
| + className |
83 |
0
| + (vendor == null ? "" : "; vendor=" + vendor)
|
84 |
0
| + (version == null ? "" : ";version=" + version);
|
85 |
| } |
86 |
| } |