Watch1300.java
1.38 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
package com.sincere.weigeng;
import com.sincere.weigeng.feign.SmFeign;
import com.sincere.weigeng.feign.XaFeign;
import com.sincere.weigeng.utils.WatchServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;
/**
* @author chen
* @version 1.0
* @date 2019/12/3 0003 11:42
*/
@Component
public class Watch1300 extends WatchServer implements ApplicationRunner {
@Autowired
SmFeign smFeign ;
@Autowired
XaFeign xaFeign;
@Override
public void run(ApplicationArguments args) throws Exception {
watchPort(1300);
Listen1300 listen1300 = new Listen1300(this);
listen1300.start();
}
class Listen1300 extends Thread{
private Watch1300 watch1300 ;
public Watch1300 getWatch1300() {
return watch1300;
}
public void setWatch1300(Watch1300 watch1300) {
this.watch1300 = watch1300;
}
public Listen1300(Watch1300 watch1300) {
this.watch1300 = watch1300;
}
@Override
public synchronized void start() {
super.start();
}
@Override
public void run() {
super.run();
this.watch1300.listen(smFeign,xaFeign);
}
}
}