Mercurial > hg > Database > Alice
view src/main/java/alice/topology/node/ReceiveCloseMessage.java @ 518:fc313323c53b dispose
add reconnect event
author | sugi |
---|---|
date | Thu, 22 Jan 2015 16:01:32 +0900 |
parents | 24e535123df7 |
children | 15eeb439830c 767d93626b88 3284428f525e |
line wrap: on
line source
package alice.topology.node; import alice.codesegment.CodeSegment; import alice.datasegment.CommandType; import alice.datasegment.Receiver; public class ReceiveCloseMessage extends CodeSegment { private Receiver info; public ReceiveCloseMessage(CommandType type) { info = ids.create(type); info.setKey("_CLOSEMESSEAGE"); } @Override public void run() { if (info.type == CommandType.PEEK) { new PrepareToClose(); } else if (info.type == CommandType.TAKE){ new ReceiveCloseMessage(CommandType.PEEK); } } }