public interface SessionFactory
Factory for
Sessions.- Author:
- harald
-
Method Summary
Modifier and TypeMethodDescriptioncreate()Creates a session with the default session info.create(SessionInfo sessionInfo) Creates a session.create(SessionPool sessionPool, SessionInfo sessionInfo) Creates a session for a pool.
Notice that this method is provided forSessionPoolimplementations only.static SessionFactoryThe singleton.booleanregisterGlobalCloseHandler(SessionCloseHandler closeHandler) Registers a global close handler for all sessions.booleanunregisterGlobalCloseHandler(SessionCloseHandler closeHandler) Unregisters a global close handler for all sessions.
-
Method Details
-
getInstance
The singleton.- Returns:
- the singleton
-
create
Session create()Creates a session with the default session info.- Returns:
- the open session
-
create
Creates a session.- Parameters:
sessionInfo- the session info- Returns:
- the open session
-
create
Creates a session for a pool.
Notice that this method is provided forSessionPoolimplementations only. Applications must useSessionProvider.getSession()instead.- Parameters:
sessionPool- the pool requesting a new sessionsessionInfo- the session info- Returns:
- the open session
-
registerGlobalCloseHandler
Registers a global close handler for all sessions.- Parameters:
closeHandler- the handler- Returns:
- true if added, false if already registered
-
unregisterGlobalCloseHandler
Unregisters a global close handler for all sessions.- Parameters:
closeHandler- the handler- Returns:
- true if removed, false if not registered
-