package lava.net.mmp; import java.util.Vector; import lava.net.common.Packet; import lava.net.common.UNA; /** * **/ public class MMPPacket extends Packet { /** * **/ private UNA remote = null; /** * **/ private UNA local = null; /** * **/ private boolean counterSet = false; /** * **/ private long counter = 0; /** * **/ private boolean initialize = false; /** * **/ public MMPPacket() { super(); } /** * **/ public MMPPacket(Vector header, String body) { super(header,body); } /** * **/ protected MMPPacket(UNA remote, Vector header, String body) { super(header,body); setRemote(remote); } /** * **/ protected MMPPacket(MMPConnection connection, Vector header, String body) { super(header,body); setRemote(connection.remote); setLocal(connection.local); } /** * **/ protected void setRemote(UNA remote) { this.remote = remote; } /** * **/ protected void setLocal(UNA local) { this.local = local; } /** * **/ protected void setCounter(long counter) { counterSet = true; this.counter = counter; } /** * **/ protected void setInitialize() { initialize = true; } /** * **/ public UNA getRemote() { return remote; } /** * **/ public UNA getLocal() { return local; } /** * **/ public boolean hasCounter() { return counterSet; } /** * **/ public long getCounter() { return counter; } /** * **/ public boolean isInitialize() { return initialize; } }