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:
java.io.Serializable, 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
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
CxDxServerSessionImpl(ICxDxMessageFactory fct, SessionFactory sf, ServerCxDxSessionListener lst)
           
CxDxServerSessionImpl(java.lang.String sessionId, ICxDxMessageFactory fct, SessionFactory sf, ServerCxDxSessionListener lst)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
<E> E
getState(java.lang.Class<E> stateType)
           
 boolean handleEvent(StateEvent event)
           
 int hashCode()
           
 Answer processRequest(Request request)
           
 void receivedSuccessMessage(Request request, Answer answer)
           
 void relink(IContainer stack)
           
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, isReplicable, isStateless, removeStateChangeNotification, startMsgTimer
 
Methods inherited from class org.jdiameter.common.impl.app.AppSessionImpl
getCreationTime, getLastAccessedTime, getSessionAppId, getSessionId, getSessions, isAppSession, isValid, onTimer, 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

CxDxServerSessionImpl

public CxDxServerSessionImpl(ICxDxMessageFactory fct,
                             SessionFactory sf,
                             ServerCxDxSessionListener lst)

CxDxServerSessionImpl

public CxDxServerSessionImpl(java.lang.String sessionId,
                             ICxDxMessageFactory fct,
                             SessionFactory 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

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>

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

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)


Copyright © 2010. All Rights Reserved.