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

org.dflib.jjava.jupyter.messages.request.ShutdownRequest Maven / Gradle / Ivy

The newest version!
package org.dflib.jjava.jupyter.messages.request;

import org.dflib.jjava.jupyter.messages.ContentType;
import org.dflib.jjava.jupyter.messages.MessageType;
import org.dflib.jjava.jupyter.messages.RequestType;
import org.dflib.jjava.jupyter.messages.reply.ShutdownReply;

public class ShutdownRequest implements ContentType, RequestType {
    public static final MessageType MESSAGE_TYPE = MessageType.SHUTDOWN_REQUEST;
    public static final MessageType REPLY_MESSAGE_TYPE = MessageType.SHUTDOWN_REPLY;

    @Override
    public MessageType getType() {
        return MESSAGE_TYPE;
    }

    @Override
    public MessageType getReplyType() {
        return REPLY_MESSAGE_TYPE;
    }

    public static final ShutdownRequest SHUTDOWN_AND_RESTART = new ShutdownRequest(true);
    public static final ShutdownRequest SHUTDOWN = new ShutdownRequest(false);

    protected boolean restart;

    private ShutdownRequest(boolean restart) {
        this.restart = restart;
    }

    public boolean isRestart() {
        return restart;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy