public class AuthSessionFactoryImpl extends Object implements IAuthSessionFactory, IAuthMessageFactory, ServerAuthSessionListener, ClientAuthSessionListener, IClientAuthActionContext, IServerAuthActionContext, StateChangeListener<AppSession>
Modifier and Type | Field and Description |
---|---|
protected IClientAuthActionContext |
clientSessionContext |
protected ClientAuthSessionListener |
clientSessionListener |
protected ISessionDatasource |
iss |
protected static org.slf4j.Logger |
logger |
protected IAuthMessageFactory |
messageFactory |
protected long |
messageTimeout |
protected IServerAuthActionContext |
serverSessionContext |
protected ServerAuthSessionListener |
serverSessionListener |
protected IAppSessionDataFactory<IAuthSessionData> |
sessionDataFactory |
protected ISessionFactory |
sessionFactory |
protected boolean |
stateles |
protected StateChangeListener<AppSession> |
stateListener |
Constructor and Description |
---|
AuthSessionFactoryImpl(SessionFactory sessionFactory) |
protected IAuthMessageFactory messageFactory
protected ServerAuthSessionListener serverSessionListener
protected StateChangeListener<AppSession> stateListener
protected ClientAuthSessionListener clientSessionListener
protected boolean stateles
protected long messageTimeout
protected static final org.slf4j.Logger logger
protected ISessionDatasource iss
protected ISessionFactory sessionFactory
protected IServerAuthActionContext serverSessionContext
protected IClientAuthActionContext clientSessionContext
protected IAppSessionDataFactory<IAuthSessionData> sessionDataFactory
public AuthSessionFactoryImpl(SessionFactory sessionFactory)
public IClientAuthActionContext getClientSessionContext()
getClientSessionContext
in interface IAuthSessionFactory
public void setClientSessionContext(IClientAuthActionContext clientSessionContext)
setClientSessionContext
in interface IAuthSessionFactory
clientSessionContext
- the clientSessionContext to setpublic IServerAuthActionContext getServerSessionContext()
getServerSessionContext
in interface IAuthSessionFactory
public void setServerSessionContext(IServerAuthActionContext serverSessionContext)
setServerSessionContext
in interface IAuthSessionFactory
serverSessionContext
- the serverSessionContext to setpublic long getMessageTimeout()
getMessageTimeout
in interface IAuthSessionFactory
public void setMessageTimeout(long messageTimeout)
setMessageTimeout
in interface IAuthSessionFactory
messageTimeout
- the messageTimeout to setpublic IAuthMessageFactory getMessageFactory()
getMessageFactory
in interface IAuthSessionFactory
public void setMessageFactory(IAuthMessageFactory messageFactory)
setMessageFactory
in interface IAuthSessionFactory
messageFactory
- the messageFactory to setpublic ServerAuthSessionListener getServerSessionListener()
getServerSessionListener
in interface IAuthSessionFactory
public void setServerSessionListener(ServerAuthSessionListener serverSessionListener)
setServerSessionListener
in interface IAuthSessionFactory
serverSessionListener
- the serverSessionListener to setpublic StateChangeListener<AppSession> getStateListener()
getStateListener
in interface IAuthSessionFactory
public void setStateListener(StateChangeListener<AppSession> stateListener)
setStateListener
in interface IAuthSessionFactory
stateListener
- the stateListener to setpublic ClientAuthSessionListener getClientSessionListener()
getClientSessionListener
in interface IAuthSessionFactory
public void setClientSessionListener(ClientAuthSessionListener clientSessionListener)
setClientSessionListener
in interface IAuthSessionFactory
clientSessionListener
- the clientSessionListener to setpublic boolean isStateles()
isStateles
in interface IAuthSessionFactory
public void setStateles(boolean stateles)
setStateles
in interface IAuthSessionFactory
public AppSession getSession(String sessionId, Class<? extends AppSession> aClass)
getSession
in interface IAppSessionFactory
public AppSession getNewSession(String sessionId, Class<? extends AppSession> aClass, ApplicationId applicationId, Object[] args)
getNewSession
in interface IAppSessionFactory
public AppAnswerEvent createAuthAnswer(Answer answer)
createAuthAnswer
in interface IAuthMessageFactory
public AppRequestEvent createAuthRequest(Request request)
createAuthRequest
in interface IAuthMessageFactory
public int getAuthMessageCommandCode()
getAuthMessageCommandCode
in interface IAuthMessageFactory
public ApplicationId getApplicationId()
getApplicationId
in interface IAuthMessageFactory
public void doAbortSessionRequestEvent(ClientAuthSession appSession, AbortSessionRequest asr) throws InternalException, IllegalDiameterStateException, RouteException, OverloadException
doAbortSessionRequestEvent
in interface ClientAuthSessionListener
InternalException
IllegalDiameterStateException
RouteException
OverloadException
public void doAbortSessionAnswerEvent(ServerAuthSession appSession, AbortSessionAnswer asa) throws InternalException, IllegalDiameterStateException, RouteException, OverloadException
doAbortSessionAnswerEvent
in interface ServerAuthSessionListener
InternalException
IllegalDiameterStateException
RouteException
OverloadException
public void doSessionTerminationRequestEvent(ServerAuthSession appSession, SessionTermRequest str) throws InternalException, IllegalDiameterStateException, RouteException, OverloadException
doSessionTerminationRequestEvent
in interface ServerAuthSessionListener
InternalException
IllegalDiameterStateException
RouteException
OverloadException
public void doSessionTerminationAnswerEvent(ClientAuthSession appSession, SessionTermAnswer sta) throws InternalException, IllegalDiameterStateException, RouteException, OverloadException
doSessionTerminationAnswerEvent
in interface ClientAuthSessionListener
InternalException
IllegalDiameterStateException
RouteException
OverloadException
public void doAuthRequestEvent(ServerAuthSession appSession, AppRequestEvent request) throws InternalException, IllegalDiameterStateException, RouteException, OverloadException
doAuthRequestEvent
in interface ServerAuthSessionListener
InternalException
IllegalDiameterStateException
RouteException
OverloadException
public void doAuthAnswerEvent(ClientAuthSession appSession, AppRequestEvent request, AppAnswerEvent answer) throws InternalException, IllegalDiameterStateException, RouteException, OverloadException
doAuthAnswerEvent
in interface ClientAuthSessionListener
InternalException
IllegalDiameterStateException
RouteException
OverloadException
public void doReAuthRequestEvent(ClientAuthSession appSession, ReAuthRequest rar) throws InternalException, IllegalDiameterStateException, RouteException, OverloadException
doReAuthRequestEvent
in interface ClientAuthSessionListener
InternalException
IllegalDiameterStateException
RouteException
OverloadException
public void doReAuthAnswerEvent(ServerAuthSession appSession, ReAuthRequest rar, ReAuthAnswer raa) throws InternalException, IllegalDiameterStateException, RouteException, OverloadException
doReAuthAnswerEvent
in interface ServerAuthSessionListener
InternalException
IllegalDiameterStateException
RouteException
OverloadException
public void doOtherEvent(AppSession appSession, AppRequestEvent request, AppAnswerEvent answer) throws InternalException, IllegalDiameterStateException, RouteException, OverloadException
doOtherEvent
in interface ClientAuthSessionListener
doOtherEvent
in interface ServerAuthSessionListener
InternalException
IllegalDiameterStateException
RouteException
OverloadException
public void stateChanged(Enum oldState, Enum newState)
stateChanged
in interface StateChangeListener<AppSession>
public void stateChanged(AppSession source, Enum oldState, Enum newState)
stateChanged
in interface StateChangeListener<AppSession>
public void accessTimeoutElapses(ClientAuthSession session) throws InternalException
accessTimeoutElapses
in interface IClientAuthActionContext
InternalException
public long getAccessTimeout() throws InternalException
getAccessTimeout
in interface IClientAuthActionContext
getAccessTimeout
in interface IServerAuthActionContext
InternalException
public void disconnectUserOrDev(ClientAuthSession session, Message request) throws InternalException
disconnectUserOrDev
in interface IClientAuthActionContext
InternalException
public void accessTimeoutElapses(ServerAuthSession session) throws InternalException
accessTimeoutElapses
in interface IServerAuthActionContext
InternalException
Copyright © 2016. All Rights Reserved.