public interface CySessionManagerThis 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
CySessionobject suitable for serialization. Likewise, setting a new session will replace the current session with a new one.
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>session-api</artifactId> </dependency>
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.
All Methods Instance Methods Abstract Methods Modifier and Type Method Description
disposeCurrentSession()Disposes the current session.
getCurrentSession()This method returns a
CySessionobject describing the current state of Cytoscape.
getCurrentSessionFileName()Returns the name of the current session file.
setCurrentSession(CySession session, String fileName)This method allows a new session to be set and in doing so erases and overrides the current session!
CySession getCurrentSession()This method returns a
CySessionobject 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.
setCurrentSessionThis 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.
String getCurrentSessionFileName()Returns the name of the current session file.
- The name of the current session file.
void disposeCurrentSession()Disposes the current session. This method is meant to be called by Cytoscape right before loading a new session.