public interface SessionManager extends NamedArtifact, SessionListenable
SessionManager maintains in-memory storage
of sessions, creates new ones and either destroys or stores existing ones persistently. All sessions are
managed via unique identifiers of the org.semanticweb.owlapi.model.IRI type.| Modifier and Type | Field and Description |
|---|---|
static String |
CONNECTIVITY_POLICY
The key used to configure the connectivity policy.
|
static String |
ID
The key used to configure the base namespace of the ontology network.
|
static String |
MAX_ACTIVE_SESSIONS
The key used to configure the base namespace of the ontology network.
|
| Modifier and Type | Method and Description |
|---|---|
Session |
createSession()
Generates and registers a new session and assigns a unique session ID generated internally.
|
Session |
createSession(String sessionID)
Generates and registers a new session and tries to assign it the supplied session ID.
|
void |
destroySession(String sessionID)
Deletes the session identified by the supplied sessionID and releases its resources.
|
int |
getActiveSessionLimit()
Gets the number of sessions that can be simultaneously active and managed by this session manager.
|
Set<String> |
getRegisteredSessionIDs()
Returns the set of strings that identify registered sessions, whatever their state.
|
Session |
getSession(String sessionID)
Retrieves the unique session identified by
sessionID. |
void |
setActiveSessionLimit(int limit)
Sets the maximum allowed number of active sessions managed by this manager simultaneously.
|
void |
storeSession(String sessionID,
OutputStream out)
Deprecated.
As of now, session contents are always stored. Deprecation will be removed if a new policy
is implemented.
|
getDefaultNamespace, getID, getNamespace, setDefaultNamespace, setNamespaceaddSessionListener, clearSessionListeners, getSessionListeners, removeSessionListenerstatic final String CONNECTIVITY_POLICY
static final String ID
static final String MAX_ACTIVE_SESSIONS
Session createSession() throws SessionLimitException
DuplicateSessionIDExceptions to be thrown.SessionLimitExceptionSession createSession(String sessionID) throws DuplicateSessionIDException, SessionLimitException
DuplicateSessionIDException is thrown.sessionID - the IRI that uniquely identifies the sessionDuplicateSessionIDException - if a session with that sessionID is already registeredSessionLimitExceptionvoid destroySession(String sessionID)
sessionID - the IRI that uniquely identifies the sessionint getActiveSessionLimit()
Set<String> getRegisteredSessionIDs()
Session getSession(String sessionID)
sessionID.sessionID - the IRI that uniquely identifies the sessionsessionIDvoid setActiveSessionLimit(int limit)
limit - void storeSession(String sessionID, OutputStream out) throws NonReferenceableSessionException, org.semanticweb.owlapi.model.OWLOntologyStorageException
sessionID using the output stream out.sessionID - the IRI that uniquely identifies the sessionout - the output stream to store the sessionorg.semanticweb.owlapi.model.OWLOntologyStorageExceptionNonReferenceableSessionExceptionCopyright © 2010-2014 The Apache Software Foundation. All Rights Reserved.