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:
java.io.Serializable, 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
See Also:
Serialized Form

Field Summary
protected  long appId
           
 
Fields inherited from class org.jdiameter.common.impl.app.cxdx.CxDxSession
_TX_TIMEOUT, buffer, messageFactory, sendAndStateLock, state, stateListeners, TIMER_NAME_MSG_TIMEOUT, timerId_timeout
 
Fields inherited from class org.jdiameter.common.impl.app.AppSessionImpl
scheduler, session, sessionDataSource, sessionId, sf, timerFacility
 
Constructor Summary
CxDxClientSessionImpl(ICxDxMessageFactory fct, SessionFactory sf, ClientCxDxSessionListener lst)
           
CxDxClientSessionImpl(java.lang.String sessionId, ICxDxMessageFactory fct, SessionFactory 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 relink(IContainer stack)
           
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, release
 
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, release
 
Methods inherited from interface org.jdiameter.api.app.StateMachine
addStateChangeNotification, removeStateChangeNotification
 

Field Detail

appId

protected long appId
Constructor Detail

CxDxClientSessionImpl

public CxDxClientSessionImpl(ICxDxMessageFactory fct,
                             SessionFactory sf,
                             ClientCxDxSessionListener lst)

CxDxClientSessionImpl

public CxDxClientSessionImpl(java.lang.String sessionId,
                             ICxDxMessageFactory fct,
                             SessionFactory 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)
Overrides:
onTimer in class AppSessionImpl

relink

public void relink(IContainer stack)
Overrides:
relink in class CxDxSession

hashCode

public int hashCode()
Overrides:
hashCode in class CxDxSession

equals

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


Copyright © 2010. All Rights Reserved.