org.jdiameter.server.impl.app.cxdx
Class CxDxServerSessionImpl

java.lang.Object
  extended by org.jdiameter.common.impl.app.AppSessionImpl
      extended by org.jdiameter.common.impl.app.cxdx.CxDxSession
          extended by org.jdiameter.server.impl.app.cxdx.CxDxServerSessionImpl
All Implemented Interfaces:
AppSession, StateMachine, BaseSession, ServerCxDxSession, EventListener<Request,Answer>, NetworkReqListener

public class CxDxServerSessionImpl
extends CxDxSession
implements ServerCxDxSession, EventListener<Request,Answer>, NetworkReqListener

Cx/Dx Server session implementation

Author:
Bartosz Baranowski , Alexandre Mendonca

Field Summary
protected  long appId
           
protected  IServerCxDxSessionData sessionData
           
 
Fields inherited from class org.jdiameter.common.impl.app.cxdx.CxDxSession
_TX_TIMEOUT, messageFactory, sendAndStateLock, stateListeners, TIMER_NAME_MSG_TIMEOUT
 
Fields inherited from class org.jdiameter.common.impl.app.AppSessionImpl
appSessionData, scheduler, session, sessions, sf, timerFacility
 
Constructor Summary
CxDxServerSessionImpl(IServerCxDxSessionData sessionData, ICxDxMessageFactory fct, ISessionFactory sf, ServerCxDxSessionListener lst)
           
 
Method Summary
<E> E
getState(java.lang.Class<E> stateType)
           
 boolean handleEvent(StateEvent event)
           
 void onTimer(java.lang.String timerName)
           
 Answer processRequest(Request request)
           
 void receivedSuccessMessage(Request request, Answer answer)
           
 void release()
           
protected  void send(org.jdiameter.server.impl.app.cxdx.Event.Type type, AppEvent request, AppEvent answer)
           
 void sendLocationInformationAnswer(JLocationInfoAnswer answer)
           
 void sendMultimediaAuthAnswer(JMultimediaAuthAnswer answer)
           
 void sendPushProfileRequest(JPushProfileRequest request)
           
 void sendRegistrationTerminationRequest(JRegistrationTerminationRequest request)
           
 void sendServerAssignmentAnswer(JServerAssignmentAnswer answer)
           
 void sendUserAuthorizationAnswer(JUserAuthorizationAnswer answer)
           
protected  void setState(CxDxSessionState newState)
           
 void timeoutExpired(Request request)
           
 
Methods inherited from class org.jdiameter.common.impl.app.cxdx.CxDxSession
addStateChangeNotification, cancelMsgTimer, equals, hashCode, isReplicable, isStateless, removeStateChangeNotification, startMsgTimer
 
Methods inherited from class org.jdiameter.common.impl.app.AppSessionImpl
getCreationTime, getLastAccessedTime, getSessionAppId, getSessionId, getSessions, isAppSession, isValid
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jdiameter.api.app.AppSession
getSessionAppId, getSessions, isStateless
 
Methods inherited from interface org.jdiameter.api.BaseSession
getCreationTime, getLastAccessedTime, getSessionId, isAppSession, isReplicable, isValid
 
Methods inherited from interface org.jdiameter.api.app.StateMachine
addStateChangeNotification, removeStateChangeNotification
 

Field Detail

appId

protected long appId

sessionData

protected IServerCxDxSessionData sessionData
Constructor Detail

CxDxServerSessionImpl

public CxDxServerSessionImpl(IServerCxDxSessionData sessionData,
                             ICxDxMessageFactory fct,
                             ISessionFactory sf,
                             ServerCxDxSessionListener lst)
Method Detail

sendLocationInformationAnswer

public void sendLocationInformationAnswer(JLocationInfoAnswer answer)
                                   throws InternalException,
                                          IllegalDiameterStateException,
                                          RouteException,
                                          OverloadException
Specified by:
sendLocationInformationAnswer in interface ServerCxDxSession
Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException

sendMultimediaAuthAnswer

public void sendMultimediaAuthAnswer(JMultimediaAuthAnswer answer)
                              throws InternalException,
                                     IllegalDiameterStateException,
                                     RouteException,
                                     OverloadException
Specified by:
sendMultimediaAuthAnswer in interface ServerCxDxSession
Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException

sendServerAssignmentAnswer

public void sendServerAssignmentAnswer(JServerAssignmentAnswer answer)
                                throws InternalException,
                                       IllegalDiameterStateException,
                                       RouteException,
                                       OverloadException
Specified by:
sendServerAssignmentAnswer in interface ServerCxDxSession
Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException

sendUserAuthorizationAnswer

public void sendUserAuthorizationAnswer(JUserAuthorizationAnswer answer)
                                 throws InternalException,
                                        IllegalDiameterStateException,
                                        RouteException,
                                        OverloadException
Specified by:
sendUserAuthorizationAnswer in interface ServerCxDxSession
Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException

sendPushProfileRequest

public void sendPushProfileRequest(JPushProfileRequest request)
                            throws InternalException,
                                   IllegalDiameterStateException,
                                   RouteException,
                                   OverloadException
Specified by:
sendPushProfileRequest in interface ServerCxDxSession
Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException

sendRegistrationTerminationRequest

public void sendRegistrationTerminationRequest(JRegistrationTerminationRequest request)
                                        throws InternalException,
                                               IllegalDiameterStateException,
                                               RouteException,
                                               OverloadException
Specified by:
sendRegistrationTerminationRequest in interface ServerCxDxSession
Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException

getState

public <E> E getState(java.lang.Class<E> stateType)
Specified by:
getState in interface StateMachine

handleEvent

public boolean handleEvent(StateEvent event)
                    throws InternalException,
                           OverloadException
Specified by:
handleEvent in interface StateMachine
Throws:
InternalException
OverloadException

release

public void release()
Specified by:
release in interface BaseSession
Overrides:
release in class CxDxSession

receivedSuccessMessage

public void receivedSuccessMessage(Request request,
                                   Answer answer)
Specified by:
receivedSuccessMessage in interface EventListener<Request,Answer>

timeoutExpired

public void timeoutExpired(Request request)
Specified by:
timeoutExpired in interface EventListener<Request,Answer>

processRequest

public Answer processRequest(Request request)
Specified by:
processRequest in interface NetworkReqListener

send

protected void send(org.jdiameter.server.impl.app.cxdx.Event.Type type,
                    AppEvent request,
                    AppEvent answer)
             throws InternalException
Throws:
InternalException

setState

protected void setState(CxDxSessionState newState)

onTimer

public void onTimer(java.lang.String timerName)
Specified by:
onTimer in class AppSessionImpl


Copyright © 2014. All Rights Reserved.