Mercurial > hg > Database > Alice
changeset 420:01c4240c2ff0 dispose
forget add class
author | sugi |
---|---|
date | Fri, 18 Jul 2014 19:47:04 +0900 (2014-07-18) |
parents | aefbe41fcf12 |
children | fdac53a9101f |
files | src/main/java/alice/daemon/ConnectionInfo.java src/main/java/alice/topology/manager/CloseEventCodeSegment.java src/main/java/alice/topology/manager/keeparive/StartKeepAlive.java |
diffstat | 3 files changed, 36 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/alice/daemon/ConnectionInfo.java Fri Jul 18 19:47:04 2014 +0900 @@ -0,0 +1,16 @@ +package alice.daemon; + +import org.msgpack.annotation.Message; + +@Message +public class ConnectionInfo { + public String addr; + public int port; + + public ConnectionInfo(){} + + public ConnectionInfo(String addr, int port) { + this.addr = addr; + this.port = port; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/alice/topology/manager/CloseEventCodeSegment.java Fri Jul 18 19:47:04 2014 +0900 @@ -0,0 +1,20 @@ +package alice.topology.manager; + +import alice.codesegment.CodeSegment; +import alice.daemon.ConnectionInfo; +import alice.datasegment.CommandType; +import alice.datasegment.Receiver; + +public abstract class CloseEventCodeSegment extends CodeSegment { + + private Receiver metaInfo = ids.create(CommandType.PEEK); + + public CloseEventCodeSegment(){ + metaInfo.setKey("disconnect"); + } + + public ConnectionInfo getConnectionInfo() { + return metaInfo.asClass(ConnectionInfo.class); + } + +}