org.jdiameter.common.impl.app.acc
Class AccSessionFactoryImpl
java.lang.Object
org.jdiameter.common.impl.app.acc.AccSessionFactoryImpl
- All Implemented Interfaces:
- ClientAccSessionListener, ServerAccSessionListener, StateChangeListener<AppSession>, IAccSessionFactory, IClientAccActionContext, IServerAccActionContext, IAppSessionFactory
public class AccSessionFactoryImpl
- extends java.lang.Object
- implements IAccSessionFactory, ServerAccSessionListener, ClientAccSessionListener, IClientAccActionContext, IServerAccActionContext, StateChangeListener<AppSession>
Default Diameter Account Session Factory implementation
- Author:
- Bartosz Baranowski , Alexandre Mendonca
|
Method Summary |
void |
disconnectUserOrDev(ClientAccSession appSession,
Request sessionTermRequest)
Filling nested avp into STR |
void |
doAccAnswerEvent(ClientAccSession appSession,
AccountRequest acr,
AccountAnswer aca)
|
void |
doAccRequestEvent(ServerAccSession appSession,
AccountRequest acr)
|
void |
doOtherEvent(AppSession appSession,
AppRequestEvent request,
AppAnswerEvent answer)
|
boolean |
failedSendRecord(ClientAccSession appSession,
Request accRequest)
Call back for failed_send_record event |
ApplicationId |
getApplicationId()
|
IClientAccActionContext |
getClientContextListener()
|
ClientAccSessionListener |
getClientSessionListener()
|
long |
getMessageTimeout()
|
AppSession |
getNewSession(java.lang.String sessionId,
java.lang.Class<? extends AppSession> aClass,
ApplicationId applicationId,
java.lang.Object[] args)
|
IServerAccActionContext |
getServerContextListener()
|
ServerAccSessionListener |
getServerSessionListener()
|
ISessionFactory |
getSessionFactory()
|
StateChangeListener<AppSession> |
getStateListener()
|
void |
interimIntervalElapses(ClientAccSession appSession,
Request interimRequest)
Filling nested avp into interim message |
void |
sessionTimeoutElapses(ServerAccSession appSession)
|
void |
sessionTimerCanceled(ServerAccSession appSession,
java.util.concurrent.ScheduledFuture timer)
|
void |
sessionTimerStarted(ServerAccSession appSession,
java.util.concurrent.ScheduledFuture timer)
|
void |
setApplicationId(ApplicationId id)
|
void |
setClientContextListener(IClientAccActionContext clientContextListener)
|
void |
setClientSessionListener(ClientAccSessionListener clientSessionListener)
|
void |
setMessageTimeout(long messageTimeout)
|
void |
setServerContextListener(IServerAccActionContext serverContextListener)
|
void |
setServerSessionListener(ServerAccSessionListener serverSessionListener)
|
void |
setSessionFactory(ISessionFactory sessionFactory)
|
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 |
logger
protected org.slf4j.Logger logger
serverSessionListener
protected ServerAccSessionListener serverSessionListener
stateListener
protected StateChangeListener<AppSession> stateListener
clientSessionListener
protected ClientAccSessionListener clientSessionListener
clientContextListener
protected IClientAccActionContext clientContextListener
serverContextListener
protected IServerAccActionContext serverContextListener
iss
protected ISessionDatasource iss
sessionFactory
protected ISessionFactory sessionFactory
messageTimeout
protected long messageTimeout
applicationId
protected ApplicationId applicationId
AccSessionFactoryImpl
protected AccSessionFactoryImpl()
AccSessionFactoryImpl
public AccSessionFactoryImpl(SessionFactory sessionFactory)
getServerSessionListener
public ServerAccSessionListener getServerSessionListener()
- Specified by:
getServerSessionListener in interface IAccSessionFactory
- Returns:
- the serverSessionListener
setServerSessionListener
public void setServerSessionListener(ServerAccSessionListener serverSessionListener)
- Specified by:
setServerSessionListener in interface IAccSessionFactory
- Parameters:
serverSessionListener - the serverSessionListener to set
getStateListener
public StateChangeListener<AppSession> getStateListener()
- Specified by:
getStateListener in interface IAccSessionFactory
- Returns:
- the stateListener
setStateListener
public void setStateListener(StateChangeListener<AppSession> stateListener)
- Specified by:
setStateListener in interface IAccSessionFactory
- Parameters:
stateListener - the stateListener to set
getClientSessionListener
public ClientAccSessionListener getClientSessionListener()
- Specified by:
getClientSessionListener in interface IAccSessionFactory
- Returns:
- the clientSessionListener
setClientSessionListener
public void setClientSessionListener(ClientAccSessionListener clientSessionListener)
- Specified by:
setClientSessionListener in interface IAccSessionFactory
- Parameters:
clientSessionListener - the clientSessionListener to set
getClientContextListener
public IClientAccActionContext getClientContextListener()
- Specified by:
getClientContextListener in interface IAccSessionFactory
- Returns:
- the clientContextListener
setClientContextListener
public void setClientContextListener(IClientAccActionContext clientContextListener)
- Specified by:
setClientContextListener in interface IAccSessionFactory
- Parameters:
clientContextListener - the clientContextListener to set
getServerContextListener
public IServerAccActionContext getServerContextListener()
- Specified by:
getServerContextListener in interface IAccSessionFactory
- Returns:
- the serverContextListener
setServerContextListener
public void setServerContextListener(IServerAccActionContext serverContextListener)
- Specified by:
setServerContextListener in interface IAccSessionFactory
- Parameters:
serverContextListener - the serverContextListener to set
getMessageTimeout
public long getMessageTimeout()
- Specified by:
getMessageTimeout in interface IAccSessionFactory
- Returns:
- the messageTimeout
setMessageTimeout
public void setMessageTimeout(long messageTimeout)
- Specified by:
setMessageTimeout in interface IAccSessionFactory
- Parameters:
messageTimeout - the messageTimeout to set
getSessionFactory
public ISessionFactory getSessionFactory()
- Returns:
- the sessionFactory
setSessionFactory
public void setSessionFactory(ISessionFactory sessionFactory)
- Parameters:
sessionFactory - the sessionFactory to set
getApplicationId
public ApplicationId getApplicationId()
- Specified by:
getApplicationId in interface IAccSessionFactory
setApplicationId
public void setApplicationId(ApplicationId id)
- Specified by:
setApplicationId in interface IAccSessionFactory
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>
stateChanged
public void stateChanged(AppSession source,
java.lang.Enum oldState,
java.lang.Enum newState)
- Specified by:
stateChanged in interface StateChangeListener<AppSession>
doAccRequestEvent
public void doAccRequestEvent(ServerAccSession appSession,
AccountRequest acr)
throws InternalException,
IllegalDiameterStateException,
RouteException,
OverloadException
- Specified by:
doAccRequestEvent in interface ServerAccSessionListener
- Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException
doAccAnswerEvent
public void doAccAnswerEvent(ClientAccSession appSession,
AccountRequest acr,
AccountAnswer aca)
throws InternalException,
IllegalDiameterStateException,
RouteException,
OverloadException
- Specified by:
doAccAnswerEvent in interface ClientAccSessionListener
- 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 ClientAccSessionListener- Specified by:
doOtherEvent in interface ServerAccSessionListener
- Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException
disconnectUserOrDev
public void disconnectUserOrDev(ClientAccSession appSession,
Request sessionTermRequest)
throws InternalException
- Description copied from interface:
IClientAccActionContext
- Filling nested avp into STR
- Specified by:
disconnectUserOrDev in interface IClientAccActionContext
sessionTermRequest - instance of STR which will be sent to server
- Throws:
InternalException
failedSendRecord
public boolean failedSendRecord(ClientAccSession appSession,
Request accRequest)
throws InternalException
- Description copied from interface:
IClientAccActionContext
- Call back for failed_send_record event
- Specified by:
failedSendRecord in interface IClientAccActionContext
accRequest - accounting request record
- Returns:
- true if you want put message to buffer and false if you want to stop processing
- Throws:
InternalException
interimIntervalElapses
public void interimIntervalElapses(ClientAccSession appSession,
Request interimRequest)
throws InternalException
- Description copied from interface:
IClientAccActionContext
- Filling nested avp into interim message
- Specified by:
interimIntervalElapses in interface IClientAccActionContext
interimRequest - instance of interim message which will be sent to server
- Throws:
InternalException
sessionTimeoutElapses
public void sessionTimeoutElapses(ServerAccSession appSession)
throws InternalException
- Specified by:
sessionTimeoutElapses in interface IServerAccActionContext
- Throws:
InternalException
sessionTimerStarted
public void sessionTimerStarted(ServerAccSession appSession,
java.util.concurrent.ScheduledFuture timer)
throws InternalException
- Specified by:
sessionTimerStarted in interface IServerAccActionContext
- Throws:
InternalException
sessionTimerCanceled
public void sessionTimerCanceled(ServerAccSession appSession,
java.util.concurrent.ScheduledFuture timer)
throws InternalException
- Specified by:
sessionTimerCanceled in interface IServerAccActionContext
- Throws:
InternalException
Copyright © 2010. All Rights Reserved.