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