org.jdiameter.client.impl.app.cxdx
Class CxDxClientSessionImpl

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

public class CxDxClientSessionImpl
extends CxDxSession
implements ClientCxDxSession, EventListener<Request,Answer>, NetworkReqListener

Diameter Cx/Dx Client Session implementation

Author:
Bartosz Baranowski , Alexandre Mendonca

Field Summary
protected  long appId
           
protected  IClientCxDxSessionData 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
CxDxClientSessionImpl(IClientCxDxSessionData sessionData, ICxDxMessageFactory fct, ISessionFactory sf, ClientCxDxSessionListener lst)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
<E> E
getState(java.lang.Class<E> stateType)
           
 boolean handleEvent(StateEvent event)
           
 int hashCode()
           
 void onTimer(java.lang.String timerName)
           
 Answer processRequest(Request request)
           
 void receivedSuccessMessage(Request request, Answer answer)
           
 void release()
           
protected  void send(org.jdiameter.client.impl.app.cxdx.Event.Type type, AppEvent request, AppEvent answer)
           
 void sendLocationInformationRequest(JLocationInfoRequest request)
           
 void sendMultimediaAuthRequest(JMultimediaAuthRequest request)
           
 void sendPushProfileAnswer(JPushProfileAnswer answer)
           
 void sendRegistrationTerminationAnswer(JRegistrationTerminationAnswer answer)
           
 void sendServerAssignmentRequest(JServerAssignmentRequest request)
           
 void sendUserAuthorizationRequest(JUserAuthorizationRequest request)
           
protected  void setState(CxDxSessionState newState)
           
 void timeoutExpired(Request request)
           
 
Methods inherited from class org.jdiameter.common.impl.app.cxdx.CxDxSession
addStateChangeNotification, cancelMsgTimer, 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 IClientCxDxSessionData sessionData
Constructor Detail

CxDxClientSessionImpl

public CxDxClientSessionImpl(IClientCxDxSessionData sessionData,
                             ICxDxMessageFactory fct,
                             ISessionFactory sf,
                             ClientCxDxSessionListener lst)
Method Detail

getState

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

processRequest

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

sendLocationInformationRequest

public void sendLocationInformationRequest(JLocationInfoRequest request)
                                    throws InternalException,
                                           IllegalDiameterStateException,
                                           RouteException,
                                           OverloadException
Specified by:
sendLocationInformationRequest in interface ClientCxDxSession
Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException

sendMultimediaAuthRequest

public void sendMultimediaAuthRequest(JMultimediaAuthRequest request)
                               throws InternalException,
                                      IllegalDiameterStateException,
                                      RouteException,
                                      OverloadException
Specified by:
sendMultimediaAuthRequest in interface ClientCxDxSession
Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException

sendServerAssignmentRequest

public void sendServerAssignmentRequest(JServerAssignmentRequest request)
                                 throws InternalException,
                                        IllegalDiameterStateException,
                                        RouteException,
                                        OverloadException
Specified by:
sendServerAssignmentRequest in interface ClientCxDxSession
Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException

sendUserAuthorizationRequest

public void sendUserAuthorizationRequest(JUserAuthorizationRequest request)
                                  throws InternalException,
                                         IllegalDiameterStateException,
                                         RouteException,
                                         OverloadException
Specified by:
sendUserAuthorizationRequest in interface ClientCxDxSession
Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException

sendPushProfileAnswer

public void sendPushProfileAnswer(JPushProfileAnswer answer)
                           throws InternalException,
                                  IllegalDiameterStateException,
                                  RouteException,
                                  OverloadException
Specified by:
sendPushProfileAnswer in interface ClientCxDxSession
Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException

sendRegistrationTerminationAnswer

public void sendRegistrationTerminationAnswer(JRegistrationTerminationAnswer answer)
                                       throws InternalException,
                                              IllegalDiameterStateException,
                                              RouteException,
                                              OverloadException
Specified by:
sendRegistrationTerminationAnswer in interface ClientCxDxSession
Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException

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>

send

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

handleEvent

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

setState

protected void setState(CxDxSessionState newState)

onTimer

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

hashCode

public int hashCode()
Overrides:
hashCode in class CxDxSession

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class CxDxSession

release

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


Copyright © 2014. All Rights Reserved.