org.dflib.jjava.jupyter.messages.reply.ShutdownReply Maven / Gradle / Ivy
The newest version!
package org.dflib.jjava.jupyter.messages.reply;
import org.dflib.jjava.jupyter.messages.ContentType;
import org.dflib.jjava.jupyter.messages.MessageType;
import org.dflib.jjava.jupyter.messages.ReplyType;
import org.dflib.jjava.jupyter.messages.request.ShutdownRequest;
public class ShutdownReply implements ContentType, ReplyType {
public static final MessageType MESSAGE_TYPE = MessageType.SHUTDOWN_REPLY;
public static final MessageType REQUEST_MESSAGE_TYPE = MessageType.SHUTDOWN_REQUEST;
@Override
public MessageType getType() {
return MESSAGE_TYPE;
}
@Override
public MessageType getRequestType() {
return REQUEST_MESSAGE_TYPE;
}
public static final ShutdownReply SHUTDOWN_AND_RESTART = new ShutdownReply(true);
public static final ShutdownReply SHUTDOWN = new ShutdownReply(false);
protected boolean restart;
private ShutdownReply(boolean restart) {
this.restart = restart;
}
public boolean isRestart() {
return restart;
}
}