Interface CySessionManager

public interface CySessionManager
This class primarily acts as a listener and tracks the state of the Cytoscape application. This state can be interrogated at any time and the result is an immutable CySession object suitable for serialization. Likewise, setting a new session will replace the current session with a new one.

Module: session-api

To use this in your app, include the following dependency in your POM:


Cytoscape Backwards Compatibility (API Interface): We expect that this interface will be used but not implemented by developers using this interface. As such, we reserve the right to add methods to the interface as part of minor version upgrades. We will not remove methods for any changes other than major version upgrades.
  • Method Details

    • getCurrentSession

      CySession getCurrentSession()
      This method returns a CySession object describing the current state of Cytoscape. The object returned is meant to be used for serialization and is not meant to be used interactively to track the state of Cytsocape.
      An immutable CySession object.
    • setCurrentSession

      void setCurrentSession(CySession session, String fileName)
      This method allows a new session to be set and in doing so erases and overrides the current session!
      session - The new session to be applied to Cytoscape.
      fileName - The name of the file representing the new session.
    • getCurrentSessionFileName

      String getCurrentSessionFileName()
      Returns the name of the current session file.
      The name of the current session file.
    • disposeCurrentSession

      void disposeCurrentSession()
      Disposes the current session. This method is meant to be called by Cytoscape right before loading a new session.