1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package net.sf.jack4j;
21
22
23
24
25
26
27
28
29
30
31 public class JackInternalClient {
32
33 static {
34 JackBridge.initializeJackBridge();
35 }
36
37 @SuppressWarnings("unused")
38 private volatile long loadingClientHandle;
39 private volatile long internalClientHandle;
40
41 JackInternalClient(long loadingClientHandle, long internalClientHandle) {
42 this.loadingClientHandle = loadingClientHandle;
43 this.internalClientHandle = internalClientHandle;
44 }
45
46
47
48
49 public long getHandle() {
50 return internalClientHandle;
51 }
52
53
54
55
56 public native String getName();
57
58
59
60
61 public native void unload() throws JackException;
62
63
64
65
66 @Override
67 public int hashCode() {
68 final int prime = 31;
69 int result = 1;
70 result = prime * result + (int) (internalClientHandle ^ (internalClientHandle >>> 32));
71 result = prime * result + (int) (loadingClientHandle ^ (loadingClientHandle >>> 32));
72 return result;
73 }
74
75
76
77
78 @Override
79 public boolean equals(Object obj) {
80 if (this == obj) return true;
81 if (obj == null) return false;
82 if (getClass() != obj.getClass()) return false;
83 final JackInternalClient other = (JackInternalClient) obj;
84 if (internalClientHandle != other.internalClientHandle) return false;
85 if (loadingClientHandle != other.loadingClientHandle) return false;
86 return true;
87 }
88 }