Пример #1
0
  public void reconnect() throws MathLinkException {
    kernelLink.removePacketListener(this);
    kernelLink.close();

    kernelLink = MathLinkFactory.createKernelLink(mlargs);
    kernelLink.addPacketListener(this);
    kernelLink.discardAnswer();
  }
Пример #2
0
  public void close() {
    // Close the kernel link
    kernelLink.close();

    // Release all allocated resources
    release();

    // Delete the cache folder (it should be empty now)
    File cacheFp = getSessionFolder();
    if (cacheFp.exists()) cacheFp.delete();
  }