Skip to content

Commit e94293d

Browse files
committed
allow for more base kernel reuse
1 parent 218a30d commit e94293d

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

jjava-jupyter/src/main/java/org/dflib/jjava/jupyter/kernel/BaseKernel.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ protected void replaceOutputStreams(ShellReplyEnvironment env) {
364364
});
365365
}
366366

367-
private synchronized void handleExecuteRequest(ShellReplyEnvironment env, Message<ExecuteRequest> executeRequestMessage) {
367+
protected synchronized void handleExecuteRequest(ShellReplyEnvironment env, Message<ExecuteRequest> executeRequestMessage) {
368368
commManager.setMessageContext(executeRequestMessage);
369369

370370
ExecuteRequest request = executeRequestMessage.getContent();
@@ -398,7 +398,7 @@ private synchronized void handleExecuteRequest(ShellReplyEnvironment env, Messag
398398
}
399399
}
400400

401-
private void handleInspectRequest(ShellReplyEnvironment env, Message<InspectRequest> inspectRequestMessage) {
401+
protected void handleInspectRequest(ShellReplyEnvironment env, Message<InspectRequest> inspectRequestMessage) {
402402
InspectRequest request = inspectRequestMessage.getContent();
403403
env.setBusyDeferIdle();
404404
try {
@@ -409,7 +409,7 @@ private void handleInspectRequest(ShellReplyEnvironment env, Message<InspectRequ
409409
}
410410
}
411411

412-
private void handleCompleteRequest(ShellReplyEnvironment env, Message<CompleteRequest> completeRequestMessage) {
412+
protected void handleCompleteRequest(ShellReplyEnvironment env, Message<CompleteRequest> completeRequestMessage) {
413413
CompleteRequest request = completeRequestMessage.getContent();
414414
env.setBusyDeferIdle();
415415
try {
@@ -423,7 +423,7 @@ private void handleCompleteRequest(ShellReplyEnvironment env, Message<CompleteRe
423423
}
424424
}
425425

426-
private void handleHistoryRequest(ShellReplyEnvironment env, Message<HistoryRequest> historyRequestMessage) {
426+
protected void handleHistoryRequest(ShellReplyEnvironment env, Message<HistoryRequest> historyRequestMessage) {
427427
// If the manager is unset, short circuit and skip this message
428428
HistoryManager manager = this.getHistoryManager();
429429
if (manager == null) {
@@ -459,7 +459,7 @@ private void handleHistoryRequest(ShellReplyEnvironment env, Message<HistoryRequ
459459
}
460460
}
461461

462-
private void handleIsCodeCompeteRequest(ShellReplyEnvironment env, Message<IsCompleteRequest> isCompleteRequestMessage) {
462+
protected void handleIsCodeCompeteRequest(ShellReplyEnvironment env, Message<IsCompleteRequest> isCompleteRequestMessage) {
463463
IsCompleteRequest request = isCompleteRequestMessage.getContent();
464464
env.setBusyDeferIdle();
465465

@@ -483,7 +483,7 @@ private void handleIsCodeCompeteRequest(ShellReplyEnvironment env, Message<IsCom
483483
env.reply(reply);
484484
}
485485

486-
private void handleKernelInfoRequest(ShellReplyEnvironment env, Message<KernelInfoRequest> kernelInfoRequestMessage) {
486+
protected void handleKernelInfoRequest(ShellReplyEnvironment env, Message<KernelInfoRequest> kernelInfoRequestMessage) {
487487
env.setBusyDeferIdle();
488488
env.reply(new KernelInfoReply(
489489
Header.PROTOCOL_VERISON,
@@ -496,7 +496,7 @@ private void handleKernelInfoRequest(ShellReplyEnvironment env, Message<KernelIn
496496
);
497497
}
498498

499-
private void handleShutdownRequest(ShellReplyEnvironment env, Message<ShutdownRequest> shutdownRequestMessage) {
499+
protected void handleShutdownRequest(ShellReplyEnvironment env, Message<ShutdownRequest> shutdownRequestMessage) {
500500
ShutdownRequest request = shutdownRequestMessage.getContent();
501501
env.setBusyDeferIdle();
502502

@@ -509,7 +509,7 @@ private void handleShutdownRequest(ShellReplyEnvironment env, Message<ShutdownRe
509509
env.markForShutdown();
510510
}
511511

512-
private void handleInterruptRequest(ShellReplyEnvironment env, Message<InterruptRequest> interruptRequestMessage) {
512+
protected void handleInterruptRequest(ShellReplyEnvironment env, Message<InterruptRequest> interruptRequestMessage) {
513513
env.setBusyDeferIdle();
514514
env.defer().reply(new InterruptReply());
515515

jjava-jupyter/src/main/java/org/dflib/jjava/jupyter/kernel/display/Renderer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public <T> void register(Set<MIMEType> supported, Set<MIMEType> preferred, Set<C
122122
}));
123123
}
124124

125-
private static DisplayData finalizeDisplayData(DisplayData data, Object value) {
125+
protected DisplayData finalizeDisplayData(DisplayData data, Object value) {
126126
if (!data.hasDataForType(MIMEType.TEXT_PLAIN))
127127
data.putText(String.valueOf(value));
128128

0 commit comments

Comments
 (0)