public class SessionFactoryImpl extends Object implements ISessionFactory
ISessionFactory
Modifier and Type | Field and Description |
---|---|
protected static UIDGenerator |
uid |
Constructor and Description |
---|
SessionFactoryImpl(IContainer stack) |
Modifier and Type | Method and Description |
---|---|
IAppSessionFactory |
getAppSessionFactory(Class<? extends AppSession> sessionClass)
Retrieves the app session factory associated with an app session class
|
IContainer |
getContainer() |
<T extends AppSession> |
getNewAppSession(ApplicationId applicationId,
Class<? extends AppSession> aClass) |
<T extends AppSession> |
getNewAppSession(String sessionId,
ApplicationId applicationId,
Class<? extends AppSession> aClass) |
<T extends AppSession> |
getNewAppSession(String sessionId,
ApplicationId applicationId,
Class<? extends AppSession> aClass,
Object... args)
Method used for creating a new App Session using the specified class with the
desired Application Id and Session Id.
|
RawSession |
getNewRawSession() |
Session |
getNewSession() |
Session |
getNewSession(String sessionId) |
String |
getSessionId() |
String |
getSessionId(String custom) |
void |
registerAppFacory(Class<? extends AppSession> sessionClass,
IAppSessionFactory factory)
Registers a new App Session factory.
|
void |
unRegisterAppFacory(Class<? extends AppSession> sessionClass)
Unregisters an existing App Session factory.
|
protected static UIDGenerator uid
public SessionFactoryImpl(IContainer stack)
public String getSessionId(String custom)
getSessionId
in interface SessionFactory
public String getSessionId()
getSessionId
in interface SessionFactory
public RawSession getNewRawSession() throws InternalException
getNewRawSession
in interface SessionFactory
InternalException
public Session getNewSession() throws InternalException
getNewSession
in interface SessionFactory
InternalException
public Session getNewSession(String sessionId) throws InternalException
getNewSession
in interface SessionFactory
InternalException
public <T extends AppSession> T getNewAppSession(ApplicationId applicationId, Class<? extends AppSession> aClass) throws InternalException
getNewAppSession
in interface SessionFactory
InternalException
public <T extends AppSession> T getNewAppSession(String sessionId, ApplicationId applicationId, Class<? extends AppSession> aClass) throws InternalException
getNewAppSession
in interface SessionFactory
InternalException
public <T extends AppSession> T getNewAppSession(String sessionId, ApplicationId applicationId, Class<? extends AppSession> aClass, Object... args) throws InternalException
ISessionFactory
getNewAppSession
in interface ISessionFactory
sessionId
- the session-id for this App Session, if desiredapplicationId
- the application id for this sessionaClass
- the class of the app session objectInternalException
public void registerAppFacory(Class<? extends AppSession> sessionClass, IAppSessionFactory factory)
ISessionFactory
registerAppFacory
in interface ISessionFactory
sessionClass
- the class of the objects being generated by the factoryfactory
- the factory to generate app sessionspublic void unRegisterAppFacory(Class<? extends AppSession> sessionClass)
ISessionFactory
unRegisterAppFacory
in interface ISessionFactory
sessionClass
- the class identifier for this factorypublic IAppSessionFactory getAppSessionFactory(Class<? extends AppSession> sessionClass)
ISessionFactory
getAppSessionFactory
in interface ISessionFactory
sessionClass
- the class identifier for the desired factorypublic IContainer getContainer()
getContainer
in interface ISessionFactory
Copyright © 2016. All Rights Reserved.