Search in sources :

Example 1 with CommMsgHandler

use of com.twosigma.beakerx.kernel.handler.CommMsgHandler in project beakerx by twosigma.

the class TableDisplayActionsTest method setUp.

@Before
public void setUp() {
    kernel = new KernelTest();
    KernelManager.register(kernel);
    tableDisplay = new TableDisplay(TableDisplayTest.getListOfMapsData());
    tableDisplay.display();
    kernel.clearMessages();
    commMsgHandler = new CommMsgHandler(kernel);
}
Also used : KernelTest(com.twosigma.beakerx.KernelTest) CommMsgHandler(com.twosigma.beakerx.kernel.handler.CommMsgHandler) Before(org.junit.Before)

Example 2 with CommMsgHandler

use of com.twosigma.beakerx.kernel.handler.CommMsgHandler in project beakerx by twosigma.

the class KernelHandlers method createHandlers.

private Map<JupyterMessages, KernelHandler<Message>> createHandlers(final CommOpenHandler commOpenHandler, final KernelHandler<Message> kernelInfoHandler) {
    Map<JupyterMessages, KernelHandler<Message>> handlers = new HashMap<>();
    if (kernelInfoHandler != null) {
        handlers.put(JupyterMessages.KERNEL_INFO_REQUEST, kernelInfoHandler);
    }
    if (commOpenHandler != null) {
        handlers.put(JupyterMessages.COMM_OPEN, commOpenHandler);
    }
    handlers.put(JupyterMessages.EXECUTE_REQUEST, new ExecuteRequestHandler(kernel));
    handlers.put(JupyterMessages.COMPLETE_REQUEST, new CompleteHandler(kernel));
    handlers.put(JupyterMessages.INSPECT_REQUEST, new InspectHandler(kernel));
    handlers.put(JupyterMessages.HISTORY_REQUEST, new HistoryHandler(kernel));
    handlers.put(JupyterMessages.COMM_INFO_REQUEST, new CommInfoHandler(kernel));
    handlers.put(JupyterMessages.COMM_CLOSE, new CommCloseHandler(kernel));
    handlers.put(JupyterMessages.COMM_MSG, new CommMsgHandler(kernel));
    handlers.put(JupyterMessages.IS_COMPLETE_REQUEST, new IsCompleteRequestHandler(kernel));
    return handlers;
}
Also used : CommInfoHandler(com.twosigma.beakerx.kernel.handler.CommInfoHandler) HashMap(java.util.HashMap) ExecuteRequestHandler(com.twosigma.beakerx.kernel.handler.ExecuteRequestHandler) InspectHandler(com.twosigma.beakerx.handler.InspectHandler) CommMsgHandler(com.twosigma.beakerx.kernel.handler.CommMsgHandler) HistoryHandler(com.twosigma.beakerx.handler.HistoryHandler) IsCompleteRequestHandler(com.twosigma.beakerx.handler.IsCompleteRequestHandler) CompleteHandler(com.twosigma.beakerx.handler.CompleteHandler) CommCloseHandler(com.twosigma.beakerx.kernel.handler.CommCloseHandler) JupyterMessages(com.twosigma.beakerx.kernel.msg.JupyterMessages) KernelHandler(com.twosigma.beakerx.handler.KernelHandler)

Example 3 with CommMsgHandler

use of com.twosigma.beakerx.kernel.handler.CommMsgHandler in project beakerx by twosigma.

the class CommMsgHandlerTest method setUp.

@Before
public void setUp() {
    kernel = new KernelTest();
    commMsgHandler = new CommMsgHandler(kernel);
    message = JupyterHandlerTest.initCommMessage();
    JupyterHandlerTest.initKernelCommMapWithOneComm(kernel);
}
Also used : KernelTest(com.twosigma.beakerx.KernelTest) CommMsgHandler(com.twosigma.beakerx.kernel.handler.CommMsgHandler) Before(org.junit.Before)

Example 4 with CommMsgHandler

use of com.twosigma.beakerx.kernel.handler.CommMsgHandler in project beakerx by twosigma.

the class JupyterHandlerTest method setUp.

@Before
public void setUp() {
    commOpenHandler = new CommOpenHandler(kernel) {

        @Override
        public Handler<Message>[] getKernelControlChanelHandlers(String targetName) {
            return (Handler<Message>[]) new Handler<?>[0];
        }
    };
    commCloseHandler = new CommCloseHandler(kernel);
    commInfoHandler = new CommInfoHandler(kernel);
    commMsgHandler = new CommMsgHandler(kernel);
}
Also used : Message(com.twosigma.beakerx.message.Message) CommInfoHandler(com.twosigma.beakerx.kernel.handler.CommInfoHandler) CommMsgHandler(com.twosigma.beakerx.kernel.handler.CommMsgHandler) Handler(com.twosigma.beakerx.handler.Handler) CommCloseHandler(com.twosigma.beakerx.kernel.handler.CommCloseHandler) CommInfoHandler(com.twosigma.beakerx.kernel.handler.CommInfoHandler) CommMsgHandler(com.twosigma.beakerx.kernel.handler.CommMsgHandler) CommOpenHandler(com.twosigma.beakerx.kernel.handler.CommOpenHandler) CommOpenHandler(com.twosigma.beakerx.kernel.handler.CommOpenHandler) CommCloseHandler(com.twosigma.beakerx.kernel.handler.CommCloseHandler) Before(org.junit.Before)

Aggregations

CommMsgHandler (com.twosigma.beakerx.kernel.handler.CommMsgHandler)4 Before (org.junit.Before)3 KernelTest (com.twosigma.beakerx.KernelTest)2 CommCloseHandler (com.twosigma.beakerx.kernel.handler.CommCloseHandler)2 CommInfoHandler (com.twosigma.beakerx.kernel.handler.CommInfoHandler)2 CompleteHandler (com.twosigma.beakerx.handler.CompleteHandler)1 Handler (com.twosigma.beakerx.handler.Handler)1 HistoryHandler (com.twosigma.beakerx.handler.HistoryHandler)1 InspectHandler (com.twosigma.beakerx.handler.InspectHandler)1 IsCompleteRequestHandler (com.twosigma.beakerx.handler.IsCompleteRequestHandler)1 KernelHandler (com.twosigma.beakerx.handler.KernelHandler)1 CommOpenHandler (com.twosigma.beakerx.kernel.handler.CommOpenHandler)1 ExecuteRequestHandler (com.twosigma.beakerx.kernel.handler.ExecuteRequestHandler)1 JupyterMessages (com.twosigma.beakerx.kernel.msg.JupyterMessages)1 Message (com.twosigma.beakerx.message.Message)1 HashMap (java.util.HashMap)1