49
|
1 package christie.topology.node;
|
|
2
|
|
3
|
|
4 import christie.annotation.Peek;
|
|
5 import christie.annotation.Take;
|
|
6 import christie.codegear.CodeGear;
|
|
7 import christie.codegear.CodeGearManager;
|
127
|
8 import christie.datagear.DataGearManager;
|
49
|
9
|
|
10 import java.util.List;
|
|
11
|
|
12 public class PrepareToClose extends CodeGear {
|
|
13
|
129
|
14 @Take
|
133
|
15 String _CLOSEMESSEAGE;
|
49
|
16
|
158
|
17 @Peek
|
49
|
18 List<String> _CLIST;
|
|
19
|
127
|
20 @Peek
|
|
21 TopologyNodeConfig topologyNodeConfig;
|
|
22
|
49
|
23
|
|
24 public PrepareToClose() {
|
|
25
|
|
26 }
|
|
27
|
|
28 @Override
|
|
29 protected void run(CodeGearManager cgm) {
|
133
|
30
|
127
|
31 for(String dgmName: _CLIST){
|
|
32 getDGM(dgmName).shutdown();
|
133
|
33 //_CLIST.remove(dgmName);
|
127
|
34 }
|
|
35
|
133
|
36 getLocalDGM().finish();
|
127
|
37
|
|
38 /*if (_CLIST.contains(_CLOSEMESSEAGE)) {
|
49
|
39 _CLIST.remove(_CLOSEMESSEAGE);
|
|
40
|
127
|
41 getDGM(_CLOSEMESSEAGE).setSendError(false);
|
|
42 getDGM(_CLOSEMESSEAGE).close();
|
49
|
43
|
127
|
44 getDGM(_CLOSEMESSEAGE).put("_CLOSEREADY", _CLOSEMESSEAGE);
|
|
45 getLocalDGM().put("_CLOSEREADY", _CLOSEMESSEAGE);
|
|
46
|
|
47 cgm.setup(new CloseRemoteDataGear());
|
|
48 }
|
49
|
49 cgm.setup(new PrepareToClose());
|
127
|
50 getLocalDGM().put("_CLIST", _CLIST);*/
|
49
|
51
|
|
52 }
|
|
53
|
|
54 }
|