view src/main/java/alice/topology/HostMessage.java @ 647:e321c5ec9b58

fix toplogy manager; ring worked
author suruga
date Sun, 31 Dec 2017 19:32:27 +0900
parents 8968b24c1ce3
children
line wrap: on
line source

package alice.topology;


import org.msgpack.annotation.Message;

@Message
public class HostMessage {
    public String name;
    public int port;

    public String connectionName;
    public String absName; // this is absName which have these IP and port.

    public String reverseName;
    public String remoteAbsName;
    public String cookie; // MD5

    public boolean alive;

    public HostMessage() { }
    public HostMessage(String name, int port) {
        this.name = name;
        this.port = port;
    }

    public HostMessage(String name, int port, String connectionName, String reverseName) {
        this.name = name;
        this.port = port;
        this.connectionName = connectionName;
        this.reverseName = reverseName;
    }

    public boolean isAlive() {
        return alive;
    }

    public String toString() {
        return "HostMessage : name = " + name + ", port = " + Integer.toString(port) + " connectionName = " +
                connectionName + " absName = " + absName + "reverseName = " + reverseName + " remoteAbsName = " + remoteAbsName
                + " cokkie = " + cookie ;
    }
}