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

org.dflib.jjava.jupyter.messages.publish.PublishStream Maven / Gradle / Ivy

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

import com.google.gson.annotations.SerializedName;
import org.dflib.jjava.jupyter.messages.ContentType;
import org.dflib.jjava.jupyter.messages.MessageType;

public class PublishStream implements ContentType {
    public static final MessageType MESSAGE_TYPE = MessageType.PUBLISH_STREAM;

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

    public enum StreamType {
        @SerializedName("stdout") OUT,
        @SerializedName("stderr") ERR
    }

    /**
     * One of 'stdout' or 'stderr'
     */
    @SerializedName("name")
    private final StreamType type;
    private final String text;

    public PublishStream(StreamType type, String text) {
        this.type = type;
        this.text = text;
    }

    public StreamType getStreamType() {
        return type;
    }

    public String getText() {
        return text;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy