Skip to content

Commit fd50133

Browse files
committed
Add comm_open, comm_close and comm_msg message types
1 parent 884f905 commit fd50133

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

src/main/kotlin/org/jetbrains/kotlinx/jupyter/message_types.kt

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ enum class MessageType(val contentClass: KClass<out MessageContent>) {
8181
COMM_INFO_REQUEST(CommInfoRequest::class),
8282
COMM_INFO_REPLY(CommInfoReply::class),
8383

84+
COMM_OPEN(CommOpen::class),
85+
COMM_MSG(CommMsg::class),
86+
COMM_CLOSE(CommClose::class),
87+
8488
LIST_ERRORS_REQUEST(ListErrorsRequest::class),
8589
LIST_ERRORS_REPLY(ListErrorsReply::class);
8690

@@ -531,6 +535,29 @@ class CommInfoReply(
531535
val comms: Map<String, Comm>
532536
) : MessageContent()
533537

538+
@Serializable
539+
class CommOpen(
540+
@SerialName("comm_id")
541+
val commId: String,
542+
@SerialName("target_name")
543+
val targetName: String,
544+
val data: JsonObject? = null
545+
) : MessageContent()
546+
547+
@Serializable
548+
class CommMsg(
549+
@SerialName("comm_id")
550+
val commId: String,
551+
val data: JsonObject? = null
552+
) : MessageContent()
553+
554+
@Serializable
555+
class CommClose(
556+
@SerialName("comm_id")
557+
val commId: String,
558+
val data: JsonObject? = null
559+
) : MessageContent()
560+
534561
@Serializable
535562
class ListErrorsRequest(
536563
val code: String,

0 commit comments

Comments
 (0)