Interface SessionManager
-
- All Known Implementing Classes:
SessionManagerImpl
,SingleSessionManager
public interface SessionManager
Mange the lifecycle of theSession
.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description void
closeSession(SessionHandle sessionHandle)
Close the session with the specified identifier and releases the resources used by the session.static SessionManager
create(DefaultContext defaultContext)
Create theSessionManager
with the default configuration.Session
getSession(SessionHandle sessionHandle)
Get theSession
with the identifier.Session
openSession(SessionEnvironment environment)
Register a newSession
.void
start()
Start theSessionManager
and do the required initialization.void
stop()
Destroy theSessionManager
and releases used resources.
-
-
-
Method Detail
-
create
static SessionManager create(DefaultContext defaultContext)
Create theSessionManager
with the default configuration.
-
start
void start()
Start theSessionManager
and do the required initialization.
-
stop
void stop()
Destroy theSessionManager
and releases used resources.
-
getSession
Session getSession(SessionHandle sessionHandle) throws SqlGatewayException
Get theSession
with the identifier.- Parameters:
sessionHandle
- identifier of the session.- Returns:
- registered session.
- Throws:
SqlGatewayException
-
openSession
Session openSession(SessionEnvironment environment) throws SqlGatewayException
Register a newSession
.- Parameters:
environment
- the initialization environment.- Returns:
- created session.
- Throws:
SqlGatewayException
-
closeSession
void closeSession(SessionHandle sessionHandle) throws SqlGatewayException
Close the session with the specified identifier and releases the resources used by the session.- Parameters:
sessionHandle
- the identifier of the session.- Throws:
SqlGatewayException
-
-