protected def createSockets()

in kernel/src/main/scala/org/apache/toree/boot/layer/BareInitialization.scala [135:181]


  protected def createSockets(
    config: Config, actorSystem: ActorSystem, actorLoader: ActorLoader
  ): Unit = {
    logger.debug("Creating sockets")

    val socketConfig: SocketConfig = SocketConfig.fromConfig(config)
    logger.info("Connection Profile: "
      + Json.prettyPrint(Json.toJson(socketConfig)))

    logger.debug("Constructing ServerSocketFactory")
    val socketFactory = new SocketFactory(socketConfig)

    logger.debug("Initializing Heartbeat on port " +
      socketConfig.hb_port)
    val heartbeatActor = actorSystem.actorOf(
      Props(classOf[Heartbeat], socketFactory),
      name = SocketType.Heartbeat.toString
    )

    logger.debug("Initializing Stdin on port " +
      socketConfig.stdin_port)
    val stdinActor = actorSystem.actorOf(
      Props(classOf[Stdin], socketFactory, actorLoader),
      name = SocketType.StdIn.toString
    )

    logger.debug("Initializing Shell on port " +
      socketConfig.shell_port)
    val shellActor = actorSystem.actorOf(
      Props(classOf[Shell], socketFactory, actorLoader),
      name = SocketType.Shell.toString
    )

    logger.debug("Initializing Control on port " +
      socketConfig.control_port)
    val controlActor = actorSystem.actorOf(
      Props(classOf[Control], socketFactory, actorLoader),
      name = SocketType.Control.toString
    )

    logger.debug("Initializing IOPub on port " +
      socketConfig.iopub_port)
    val ioPubActor = actorSystem.actorOf(
      Props(classOf[IOPub], socketFactory),
      name = SocketType.IOPub.toString
    )
  }