org.jdiameter.common.impl.app.s6a
Class S6aSessionFactoryImpl

java.lang.Object
  extended by org.jdiameter.common.impl.app.s6a.S6aSessionFactoryImpl
All Implemented Interfaces:
StateChangeListener<AppSession>, ClientS6aSessionListener, ServerS6aSessionListener, IAppSessionFactory, IS6aMessageFactory, IS6aSessionFactory

public class S6aSessionFactoryImpl
extends java.lang.Object
implements IS6aSessionFactory, ServerS6aSessionListener, ClientS6aSessionListener, IS6aMessageFactory, StateChangeListener<AppSession>

Author:
Alexandre Mendonca , Richard Good , Paul Carter-Brown

Field Summary
protected  ClientS6aSessionListener clientSessionListener
           
protected  ISessionDatasource iss
           
protected  IS6aMessageFactory messageFactory
           
protected  ServerS6aSessionListener serverSessionListener
           
protected  IAppSessionDataFactory<IS6aSessionData> sessionDataFactory
           
protected  ISessionFactory sessionFactory
           
protected  StateChangeListener<AppSession> stateListener
           
 
Constructor Summary
S6aSessionFactoryImpl(SessionFactory sessionFactory)
           
 
Method Summary
 JAuthenticationInformationAnswer createAuthenticationInformationAnswer(Answer answer)
           
 JAuthenticationInformationRequest createAuthenticationInformationRequest(Request request)
           
 JCancelLocationAnswer createCancelLocationAnswer(Answer answer)
           
 JCancelLocationRequest createCancelLocationRequest(Request request)
           
 JDeleteSubscriberDataAnswer createDeleteSubscriberDataAnswer(Answer answer)
           
 JDeleteSubscriberDataRequest createDeleteSubscriberDataRequest(Request request)
           
 JInsertSubscriberDataAnswer createInsertSubscriberDataAnswer(Answer answer)
           
 JInsertSubscriberDataRequest createInsertSubscriberDataRequest(Request request)
           
 JNotifyAnswer createNotifyAnswer(Answer answer)
           
 JNotifyRequest createNotifyRequest(Request request)
           
 JPurgeUEAnswer createPurgeUEAnswer(Answer answer)
           
 JPurgeUERequest createPurgeUERequest(Request request)
           
 JResetAnswer createResetAnswer(Answer answer)
           
 JResetRequest createResetRequest(Request request)
           
 JUpdateLocationAnswer createUpdateLocationAnswer(Answer answer)
           
 JUpdateLocationRequest createUpdateLocationRequest(Request request)
           
 void doAuthenticationInformationAnswerEvent(ClientS6aSession appSession, JAuthenticationInformationRequest request, JAuthenticationInformationAnswer answer)
           
 void doAuthenticationInformationRequestEvent(ServerS6aSession appSession, JAuthenticationInformationRequest request)
           
 void doCancelLocationAnswerEvent(ServerS6aSession appSession, JCancelLocationRequest request, JCancelLocationAnswer answer)
           
 void doCancelLocationRequestEvent(ClientS6aSession appSession, JCancelLocationRequest request)
           
 void doDeleteSubscriberDataAnswerEvent(ServerS6aSession appSession, JDeleteSubscriberDataRequest request, JDeleteSubscriberDataAnswer answer)
           
 void doDeleteSubscriberDataRequestEvent(ClientS6aSession appSession, JDeleteSubscriberDataRequest request)
           
 void doInsertSubscriberDataAnswerEvent(ServerS6aSession appSession, JInsertSubscriberDataRequest request, JInsertSubscriberDataAnswer answer)
           
 void doInsertSubscriberDataRequestEvent(ClientS6aSession appSession, JInsertSubscriberDataRequest request)
           
 void doNotifyAnswerEvent(ClientS6aSession appSession, JNotifyRequest request, JNotifyAnswer answer)
           
 void doNotifyRequestEvent(ServerS6aSession appSession, JNotifyRequest request)
           
 void doOtherEvent(AppSession appSession, AppRequestEvent request, AppAnswerEvent answer)
           
 void doPurgeUEAnswerEvent(ClientS6aSession appSession, JPurgeUERequest request, JPurgeUEAnswer answer)
           
 void doPurgeUERequestEvent(ServerS6aSession appSession, JPurgeUERequest request)
           
 void doResetAnswerEvent(ServerS6aSession appSession, JResetRequest request, JResetAnswer answer)
           
 void doResetRequestEvent(ClientS6aSession appSession, JResetRequest request)
           
 void doUpdateLocationAnswerEvent(ClientS6aSession appSession, JUpdateLocationRequest request, JUpdateLocationAnswer answer)
           
 void doUpdateLocationRequestEvent(ServerS6aSession appSession, JUpdateLocationRequest request)
           
 long getApplicationId()
          Returns the Application-Id that this message factory is related to
 ClientS6aSessionListener getClientSessionListener()
          Get stack wide listener for sessions.
 IS6aMessageFactory getMessageFactory()
           
 AppSession getNewSession(java.lang.String sessionId, java.lang.Class<? extends AppSession> aClass, ApplicationId applicationId, java.lang.Object[] args)
           
 ServerS6aSessionListener getServerSessionListener()
          Get stack wide listener for sessions.
 AppSession getSession(java.lang.String sessionId, java.lang.Class<? extends AppSession> aClass)
           
 StateChangeListener<AppSession> getStateListener()
           
 void setClientSessionListener(ClientS6aSessionListener clientSessionListener)
          Set stack wide listener for sessions.
 void setMessageFactory(IS6aMessageFactory messageFactory)
           
 void setServerSessionListener(ServerS6aSessionListener serverSessionListener)
          Set stack wide listener for sessions.
 void setStateListener(StateChangeListener<AppSession> stateListener)
           
 void stateChanged(AppSession source, java.lang.Enum oldState, java.lang.Enum newState)
           
 void stateChanged(java.lang.Enum oldState, java.lang.Enum newState)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sessionFactory

protected ISessionFactory sessionFactory

serverSessionListener

protected ServerS6aSessionListener serverSessionListener

clientSessionListener

protected ClientS6aSessionListener clientSessionListener

messageFactory

protected IS6aMessageFactory messageFactory

stateListener

protected StateChangeListener<AppSession> stateListener

iss

protected ISessionDatasource iss

sessionDataFactory

protected IAppSessionDataFactory<IS6aSessionData> sessionDataFactory
Constructor Detail

S6aSessionFactoryImpl

public S6aSessionFactoryImpl(SessionFactory sessionFactory)
Method Detail

getServerSessionListener

public ServerS6aSessionListener getServerSessionListener()
Description copied from interface: IS6aSessionFactory
Get stack wide listener for sessions. In local mode it has similar effect as setting this directly in app session. However clustered session use this value when recreated!

Specified by:
getServerSessionListener in interface IS6aSessionFactory
Returns:
the serverSessionListener

setServerSessionListener

public void setServerSessionListener(ServerS6aSessionListener serverSessionListener)
Description copied from interface: IS6aSessionFactory
Set stack wide listener for sessions. In local mode it has similar effect as setting this directly in app session. However clustered session use this value when recreated!

Specified by:
setServerSessionListener in interface IS6aSessionFactory
Parameters:
serverSessionListener - the serverSessionListener to set

getClientSessionListener

public ClientS6aSessionListener getClientSessionListener()
Description copied from interface: IS6aSessionFactory
Get stack wide listener for sessions. In local mode it has similar effect as setting this directly in app session. However clustered session use this value when recreated!

Specified by:
getClientSessionListener in interface IS6aSessionFactory
Returns:
the serverSessionListener

setClientSessionListener

public void setClientSessionListener(ClientS6aSessionListener clientSessionListener)
Description copied from interface: IS6aSessionFactory
Set stack wide listener for sessions. In local mode it has similar effect as setting this directly in app session. However clustered session use this value when recreated!

Specified by:
setClientSessionListener in interface IS6aSessionFactory
Parameters:
serverSessionListener - the serverSessionListener to set

getMessageFactory

public IS6aMessageFactory getMessageFactory()
Specified by:
getMessageFactory in interface IS6aSessionFactory
Returns:
the messageFactory

setMessageFactory

public void setMessageFactory(IS6aMessageFactory messageFactory)
Specified by:
setMessageFactory in interface IS6aSessionFactory
Parameters:
messageFactory - the messageFactory to set

getStateListener

public StateChangeListener<AppSession> getStateListener()
Specified by:
getStateListener in interface IS6aSessionFactory
Returns:
the stateListener

setStateListener

public void setStateListener(StateChangeListener<AppSession> stateListener)
Specified by:
setStateListener in interface IS6aSessionFactory
Parameters:
stateListener - the stateListener to set

getSession

public AppSession getSession(java.lang.String sessionId,
                             java.lang.Class<? extends AppSession> aClass)
Specified by:
getSession in interface IAppSessionFactory

getNewSession

public AppSession getNewSession(java.lang.String sessionId,
                                java.lang.Class<? extends AppSession> aClass,
                                ApplicationId applicationId,
                                java.lang.Object[] args)
Specified by:
getNewSession in interface IAppSessionFactory

stateChanged

public void stateChanged(java.lang.Enum oldState,
                         java.lang.Enum newState)
Specified by:
stateChanged in interface StateChangeListener<AppSession>

getApplicationId

public long getApplicationId()
Description copied from interface: IS6aMessageFactory
Returns the Application-Id that this message factory is related to

Specified by:
getApplicationId in interface IS6aMessageFactory
Returns:
the Application-Id value

stateChanged

public void stateChanged(AppSession source,
                         java.lang.Enum oldState,
                         java.lang.Enum newState)
Specified by:
stateChanged in interface StateChangeListener<AppSession>

createAuthenticationInformationAnswer

public JAuthenticationInformationAnswer createAuthenticationInformationAnswer(Answer answer)
Specified by:
createAuthenticationInformationAnswer in interface IS6aMessageFactory

createAuthenticationInformationRequest

public JAuthenticationInformationRequest createAuthenticationInformationRequest(Request request)
Specified by:
createAuthenticationInformationRequest in interface IS6aMessageFactory

createUpdateLocationRequest

public JUpdateLocationRequest createUpdateLocationRequest(Request request)
Specified by:
createUpdateLocationRequest in interface IS6aMessageFactory

createUpdateLocationAnswer

public JUpdateLocationAnswer createUpdateLocationAnswer(Answer answer)
Specified by:
createUpdateLocationAnswer in interface IS6aMessageFactory

createPurgeUERequest

public JPurgeUERequest createPurgeUERequest(Request request)
Specified by:
createPurgeUERequest in interface IS6aMessageFactory

createPurgeUEAnswer

public JPurgeUEAnswer createPurgeUEAnswer(Answer answer)
Specified by:
createPurgeUEAnswer in interface IS6aMessageFactory

createCancelLocationRequest

public JCancelLocationRequest createCancelLocationRequest(Request request)
Specified by:
createCancelLocationRequest in interface IS6aMessageFactory

createCancelLocationAnswer

public JCancelLocationAnswer createCancelLocationAnswer(Answer answer)
Specified by:
createCancelLocationAnswer in interface IS6aMessageFactory

createInsertSubscriberDataRequest

public JInsertSubscriberDataRequest createInsertSubscriberDataRequest(Request request)
Specified by:
createInsertSubscriberDataRequest in interface IS6aMessageFactory

createInsertSubscriberDataAnswer

public JInsertSubscriberDataAnswer createInsertSubscriberDataAnswer(Answer answer)
Specified by:
createInsertSubscriberDataAnswer in interface IS6aMessageFactory

createDeleteSubscriberDataRequest

public JDeleteSubscriberDataRequest createDeleteSubscriberDataRequest(Request request)
Specified by:
createDeleteSubscriberDataRequest in interface IS6aMessageFactory

createDeleteSubscriberDataAnswer

public JDeleteSubscriberDataAnswer createDeleteSubscriberDataAnswer(Answer answer)
Specified by:
createDeleteSubscriberDataAnswer in interface IS6aMessageFactory

createResetRequest

public JResetRequest createResetRequest(Request request)
Specified by:
createResetRequest in interface IS6aMessageFactory

createResetAnswer

public JResetAnswer createResetAnswer(Answer answer)
Specified by:
createResetAnswer in interface IS6aMessageFactory

createNotifyRequest

public JNotifyRequest createNotifyRequest(Request request)
Specified by:
createNotifyRequest in interface IS6aMessageFactory

createNotifyAnswer

public JNotifyAnswer createNotifyAnswer(Answer answer)
Specified by:
createNotifyAnswer in interface IS6aMessageFactory

doAuthenticationInformationRequestEvent

public void doAuthenticationInformationRequestEvent(ServerS6aSession appSession,
                                                    JAuthenticationInformationRequest request)
                                             throws InternalException,
                                                    IllegalDiameterStateException,
                                                    RouteException,
                                                    OverloadException
Specified by:
doAuthenticationInformationRequestEvent in interface ServerS6aSessionListener
Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException

doPurgeUERequestEvent

public void doPurgeUERequestEvent(ServerS6aSession appSession,
                                  JPurgeUERequest request)
                           throws InternalException,
                                  IllegalDiameterStateException,
                                  RouteException,
                                  OverloadException
Specified by:
doPurgeUERequestEvent in interface ServerS6aSessionListener
Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException

doUpdateLocationRequestEvent

public void doUpdateLocationRequestEvent(ServerS6aSession appSession,
                                         JUpdateLocationRequest request)
                                  throws InternalException,
                                         IllegalDiameterStateException,
                                         RouteException,
                                         OverloadException
Specified by:
doUpdateLocationRequestEvent in interface ServerS6aSessionListener
Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException

doNotifyRequestEvent

public void doNotifyRequestEvent(ServerS6aSession appSession,
                                 JNotifyRequest request)
                          throws InternalException,
                                 IllegalDiameterStateException,
                                 RouteException,
                                 OverloadException
Specified by:
doNotifyRequestEvent in interface ServerS6aSessionListener
Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException

doCancelLocationAnswerEvent

public void doCancelLocationAnswerEvent(ServerS6aSession appSession,
                                        JCancelLocationRequest request,
                                        JCancelLocationAnswer answer)
                                 throws InternalException,
                                        IllegalDiameterStateException,
                                        RouteException,
                                        OverloadException
Specified by:
doCancelLocationAnswerEvent in interface ServerS6aSessionListener
Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException

doInsertSubscriberDataAnswerEvent

public void doInsertSubscriberDataAnswerEvent(ServerS6aSession appSession,
                                              JInsertSubscriberDataRequest request,
                                              JInsertSubscriberDataAnswer answer)
                                       throws InternalException,
                                              IllegalDiameterStateException,
                                              RouteException,
                                              OverloadException
Specified by:
doInsertSubscriberDataAnswerEvent in interface ServerS6aSessionListener
Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException

doDeleteSubscriberDataAnswerEvent

public void doDeleteSubscriberDataAnswerEvent(ServerS6aSession appSession,
                                              JDeleteSubscriberDataRequest request,
                                              JDeleteSubscriberDataAnswer answer)
                                       throws InternalException,
                                              IllegalDiameterStateException,
                                              RouteException,
                                              OverloadException
Specified by:
doDeleteSubscriberDataAnswerEvent in interface ServerS6aSessionListener
Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException

doResetAnswerEvent

public void doResetAnswerEvent(ServerS6aSession appSession,
                               JResetRequest request,
                               JResetAnswer answer)
                        throws InternalException,
                               IllegalDiameterStateException,
                               RouteException,
                               OverloadException
Specified by:
doResetAnswerEvent in interface ServerS6aSessionListener
Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException

doOtherEvent

public void doOtherEvent(AppSession appSession,
                         AppRequestEvent request,
                         AppAnswerEvent answer)
                  throws InternalException,
                         IllegalDiameterStateException,
                         RouteException,
                         OverloadException
Specified by:
doOtherEvent in interface ClientS6aSessionListener
Specified by:
doOtherEvent in interface ServerS6aSessionListener
Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException

doCancelLocationRequestEvent

public void doCancelLocationRequestEvent(ClientS6aSession appSession,
                                         JCancelLocationRequest request)
                                  throws InternalException,
                                         IllegalDiameterStateException,
                                         RouteException,
                                         OverloadException
Specified by:
doCancelLocationRequestEvent in interface ClientS6aSessionListener
Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException

doInsertSubscriberDataRequestEvent

public void doInsertSubscriberDataRequestEvent(ClientS6aSession appSession,
                                               JInsertSubscriberDataRequest request)
                                        throws InternalException,
                                               IllegalDiameterStateException,
                                               RouteException,
                                               OverloadException
Specified by:
doInsertSubscriberDataRequestEvent in interface ClientS6aSessionListener
Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException

doDeleteSubscriberDataRequestEvent

public void doDeleteSubscriberDataRequestEvent(ClientS6aSession appSession,
                                               JDeleteSubscriberDataRequest request)
                                        throws InternalException,
                                               IllegalDiameterStateException,
                                               RouteException,
                                               OverloadException
Specified by:
doDeleteSubscriberDataRequestEvent in interface ClientS6aSessionListener
Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException

doResetRequestEvent

public void doResetRequestEvent(ClientS6aSession appSession,
                                JResetRequest request)
                         throws InternalException,
                                IllegalDiameterStateException,
                                RouteException,
                                OverloadException
Specified by:
doResetRequestEvent in interface ClientS6aSessionListener
Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException

doAuthenticationInformationAnswerEvent

public void doAuthenticationInformationAnswerEvent(ClientS6aSession appSession,
                                                   JAuthenticationInformationRequest request,
                                                   JAuthenticationInformationAnswer answer)
                                            throws InternalException,
                                                   IllegalDiameterStateException,
                                                   RouteException,
                                                   OverloadException
Specified by:
doAuthenticationInformationAnswerEvent in interface ClientS6aSessionListener
Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException

doPurgeUEAnswerEvent

public void doPurgeUEAnswerEvent(ClientS6aSession appSession,
                                 JPurgeUERequest request,
                                 JPurgeUEAnswer answer)
                          throws InternalException,
                                 IllegalDiameterStateException,
                                 RouteException,
                                 OverloadException
Specified by:
doPurgeUEAnswerEvent in interface ClientS6aSessionListener
Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException

doUpdateLocationAnswerEvent

public void doUpdateLocationAnswerEvent(ClientS6aSession appSession,
                                        JUpdateLocationRequest request,
                                        JUpdateLocationAnswer answer)
                                 throws InternalException,
                                        IllegalDiameterStateException,
                                        RouteException,
                                        OverloadException
Specified by:
doUpdateLocationAnswerEvent in interface ClientS6aSessionListener
Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException

doNotifyAnswerEvent

public void doNotifyAnswerEvent(ClientS6aSession appSession,
                                JNotifyRequest request,
                                JNotifyAnswer answer)
                         throws InternalException,
                                IllegalDiameterStateException,
                                RouteException,
                                OverloadException
Specified by:
doNotifyAnswerEvent in interface ClientS6aSessionListener
Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException


Copyright © 2014. All Rights Reserved.