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.
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.
Method SummaryModifier and TypeMethodDescription
voidDisposes the current session.This method returns a
CySessionobject describing the current state of Cytoscape.Returns the name of the current session file.
voidThis method allows a new session to be set and in doing so erases and overrides the current session!
getCurrentSessionCySession 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.
getCurrentSessionFileNameString getCurrentSessionFileName()Returns the name of the current session file.
- The name of the current session file.
disposeCurrentSessionvoid disposeCurrentSession()Disposes the current session. This method is meant to be called by Cytoscape right before loading a new session.