org.jdiameter.common.impl.app.rf
Class RfSessionFactoryImpl
java.lang.Object
org.jdiameter.common.impl.app.rf.RfSessionFactoryImpl
- All Implemented Interfaces:
- StateChangeListener<AppSession>, ClientRfSessionListener, ServerRfSessionListener, IAppSessionFactory, IClientRfActionContext, IRfSessionFactory, IServerRfActionContext
public class RfSessionFactoryImpl
- extends java.lang.Object
- implements IRfSessionFactory, ServerRfSessionListener, ClientRfSessionListener, IClientRfActionContext, IServerRfActionContext, StateChangeListener<AppSession>
Default Diameter Rf Session Factory implementation
- Author:
- Bartosz Baranowski , Alexandre Mendonca
|
Method Summary |
void |
disconnectUserOrDev(ClientRfSession appSession,
Request sessionTermRequest)
Filling nested avp into STR |
void |
doOtherEvent(AppSession appSession,
AppRequestEvent request,
AppAnswerEvent answer)
|
void |
doRfAccountingAnswerEvent(ClientRfSession appSession,
RfAccountingRequest acr,
RfAccountingAnswer aca)
|
void |
doRfAccountingRequestEvent(ServerRfSession appSession,
RfAccountingRequest acr)
|
boolean |
failedSendRecord(ClientRfSession appSession,
Request rfRequest)
Call back for failed_send_record event |
ApplicationId |
getApplicationId()
|
IClientRfActionContext |
getClientContextListener()
|
ClientRfSessionListener |
getClientSessionListener()
|
long |
getMessageTimeout()
|
AppSession |
getNewSession(java.lang.String sessionId,
java.lang.Class<? extends AppSession> aClass,
ApplicationId applicationId,
java.lang.Object[] args)
|
IServerRfActionContext |
getServerContextListener()
|
ServerRfSessionListener |
getServerSessionListener()
|
AppSession |
getSession(java.lang.String sessionId,
java.lang.Class<? extends AppSession> aClass)
|
ISessionFactory |
getSessionFactory()
|
StateChangeListener<AppSession> |
getStateListener()
|
void |
interimIntervalElapses(ClientRfSession appSession,
Request interimRequest)
Filling nested avp into interim message |
void |
sessionTimeoutElapses(ServerRfSession appSession)
|
void |
sessionTimerCanceled(ServerRfSession appSession,
java.util.concurrent.ScheduledFuture timer)
|
void |
sessionTimerStarted(ServerRfSession appSession,
java.util.concurrent.ScheduledFuture timer)
|
void |
setApplicationId(ApplicationId id)
|
void |
setClientContextListener(IClientRfActionContext clientContextListener)
|
void |
setClientSessionListener(ClientRfSessionListener clientSessionListener)
|
void |
setMessageTimeout(long messageTimeout)
|
void |
setServerContextListener(IServerRfActionContext serverContextListener)
|
void |
setServerSessionListener(ServerRfSessionListener 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 ServerRfSessionListener serverSessionListener
stateListener
protected StateChangeListener<AppSession> stateListener
clientSessionListener
protected ClientRfSessionListener clientSessionListener
clientContextListener
protected IClientRfActionContext clientContextListener
serverContextListener
protected IServerRfActionContext serverContextListener
iss
protected ISessionDatasource iss
sessionFactory
protected ISessionFactory sessionFactory
messageTimeout
protected long messageTimeout
applicationId
protected ApplicationId applicationId
sessionDataFactory
protected IAppSessionDataFactory<IRfSessionData> sessionDataFactory
RfSessionFactoryImpl
protected RfSessionFactoryImpl()
RfSessionFactoryImpl
public RfSessionFactoryImpl(SessionFactory sessionFactory)
getServerSessionListener
public ServerRfSessionListener getServerSessionListener()
- Specified by:
getServerSessionListener in interface IRfSessionFactory
- Returns:
- the serverSessionListener
setServerSessionListener
public void setServerSessionListener(ServerRfSessionListener serverSessionListener)
- Specified by:
setServerSessionListener in interface IRfSessionFactory
- Parameters:
serverSessionListener - the serverSessionListener to set
getStateListener
public StateChangeListener<AppSession> getStateListener()
- Specified by:
getStateListener in interface IRfSessionFactory
- Returns:
- the stateListener
setStateListener
public void setStateListener(StateChangeListener<AppSession> stateListener)
- Specified by:
setStateListener in interface IRfSessionFactory
- Parameters:
stateListener - the stateListener to set
getClientSessionListener
public ClientRfSessionListener getClientSessionListener()
- Specified by:
getClientSessionListener in interface IRfSessionFactory
- Returns:
- the clientSessionListener
setClientSessionListener
public void setClientSessionListener(ClientRfSessionListener clientSessionListener)
- Specified by:
setClientSessionListener in interface IRfSessionFactory
- Parameters:
clientSessionListener - the clientSessionListener to set
getClientContextListener
public IClientRfActionContext getClientContextListener()
- Specified by:
getClientContextListener in interface IRfSessionFactory
- Returns:
- the clientContextListener
setClientContextListener
public void setClientContextListener(IClientRfActionContext clientContextListener)
- Specified by:
setClientContextListener in interface IRfSessionFactory
- Parameters:
clientContextListener - the clientContextListener to set
getServerContextListener
public IServerRfActionContext getServerContextListener()
- Specified by:
getServerContextListener in interface IRfSessionFactory
- Returns:
- the serverContextListener
setServerContextListener
public void setServerContextListener(IServerRfActionContext serverContextListener)
- Specified by:
setServerContextListener in interface IRfSessionFactory
- Parameters:
serverContextListener - the serverContextListener to set
getMessageTimeout
public long getMessageTimeout()
- Specified by:
getMessageTimeout in interface IRfSessionFactory
- Returns:
- the messageTimeout
setMessageTimeout
public void setMessageTimeout(long messageTimeout)
- Specified by:
setMessageTimeout in interface IRfSessionFactory
- 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 IRfSessionFactory
setApplicationId
public void setApplicationId(ApplicationId id)
- Specified by:
setApplicationId in interface IRfSessionFactory
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>
stateChanged
public void stateChanged(AppSession source,
java.lang.Enum oldState,
java.lang.Enum newState)
- Specified by:
stateChanged in interface StateChangeListener<AppSession>
doRfAccountingRequestEvent
public void doRfAccountingRequestEvent(ServerRfSession appSession,
RfAccountingRequest acr)
throws InternalException,
IllegalDiameterStateException,
RouteException,
OverloadException
- Specified by:
doRfAccountingRequestEvent in interface ServerRfSessionListener
- Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException
doRfAccountingAnswerEvent
public void doRfAccountingAnswerEvent(ClientRfSession appSession,
RfAccountingRequest acr,
RfAccountingAnswer aca)
throws InternalException,
IllegalDiameterStateException,
RouteException,
OverloadException
- Specified by:
doRfAccountingAnswerEvent in interface ClientRfSessionListener
- 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 ClientRfSessionListener- Specified by:
doOtherEvent in interface ServerRfSessionListener
- Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException
disconnectUserOrDev
public void disconnectUserOrDev(ClientRfSession appSession,
Request sessionTermRequest)
throws InternalException
- Description copied from interface:
IClientRfActionContext
- Filling nested avp into STR
- Specified by:
disconnectUserOrDev in interface IClientRfActionContext
sessionTermRequest - instance of STR which will be sent to server
- Throws:
InternalException
failedSendRecord
public boolean failedSendRecord(ClientRfSession appSession,
Request rfRequest)
throws InternalException
- Description copied from interface:
IClientRfActionContext
- Call back for failed_send_record event
- Specified by:
failedSendRecord in interface IClientRfActionContext
rfRequest - 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(ClientRfSession appSession,
Request interimRequest)
throws InternalException
- Description copied from interface:
IClientRfActionContext
- Filling nested avp into interim message
- Specified by:
interimIntervalElapses in interface IClientRfActionContext
interimRequest - instance of interim message which will be sent to server
- Throws:
InternalException
sessionTimeoutElapses
public void sessionTimeoutElapses(ServerRfSession appSession)
throws InternalException
- Specified by:
sessionTimeoutElapses in interface IServerRfActionContext
- Throws:
InternalException
sessionTimerStarted
public void sessionTimerStarted(ServerRfSession appSession,
java.util.concurrent.ScheduledFuture timer)
throws InternalException
- Specified by:
sessionTimerStarted in interface IServerRfActionContext
- Throws:
InternalException
sessionTimerCanceled
public void sessionTimerCanceled(ServerRfSession appSession,
java.util.concurrent.ScheduledFuture timer)
throws InternalException
- Specified by:
sessionTimerCanceled in interface IServerRfActionContext
- Throws:
InternalException
Copyright © 2014. All Rights Reserved.