All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dev.mayuna.timestop.networking.timestop.TimeStopMessage Maven / Gradle / Ivy

package dev.mayuna.timestop.networking.timestop;

import lombok.Getter;
import lombok.Setter;

import java.util.UUID;

@Getter
@Setter
public abstract class TimeStopMessage {

    private UUID timeStopMessageId = UUID.randomUUID();
    private UUID timeStopResponseToMessageId;

    /**
     * Sets the message id
     *
     * @param message The message
     *
     * @return Itself
     */
    public TimeStopMessage withResponseTo(TimeStopMessage message) {
        this.timeStopResponseToMessageId = message.getTimeStopMessageId();
        return this;
    }

    /**
     * Sets the message id
     *
     * @param messageId The message id
     *
     * @return Itself
     */
    public TimeStopMessage withResponseTo(UUID messageId) {
        this.timeStopResponseToMessageId = messageId;
        return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy