org.jdiameter.server.impl.app.sh
Class ShServerSessionImpl
java.lang.Object
org.jdiameter.common.impl.app.AppSessionImpl
org.jdiameter.common.impl.app.sh.ShSession
org.jdiameter.server.impl.app.sh.ShServerSessionImpl
- All Implemented Interfaces:
- AppSession, StateMachine, BaseSession, EventListener<Request,Answer>, NetworkReqListener, ServerShSession
public class ShServerSessionImpl
- extends ShSession
- implements ServerShSession, EventListener<Request,Answer>, NetworkReqListener
Basic implementation of ShServerSession - can be one time - for UDR, PUR and
constant for SNR-PNR pair, in case when SNA contains response code from range
different than 2001-2004(success codes) user is responsible for maintaing
state - releasing etc, same goes if result code is contained
Experimental-Result AVP
If ShSession moves to ShSessionState.TERMINATED - it means that no further
messages can be received via it and it should be discarded.
- Author:
- Bartosz Baranowski , Alexandre Mendonca
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
sendAndStateLock
protected java.util.concurrent.locks.Lock sendAndStateLock
factory
protected transient IShMessageFactory factory
listener
protected transient ServerShSessionListener listener
sessionData
protected IShServerSessionData sessionData
appId
protected long appId
ShServerSessionImpl
public ShServerSessionImpl(IShServerSessionData sessionData,
IShMessageFactory fct,
ISessionFactory sf,
ServerShSessionListener lst)
sendProfileUpdateAnswer
public void sendProfileUpdateAnswer(ProfileUpdateAnswer answer)
throws InternalException,
IllegalDiameterStateException,
RouteException,
OverloadException
- Specified by:
sendProfileUpdateAnswer in interface ServerShSession
- Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException
sendPushNotificationRequest
public void sendPushNotificationRequest(PushNotificationRequest request)
throws InternalException,
IllegalDiameterStateException,
RouteException,
OverloadException
- Specified by:
sendPushNotificationRequest in interface ServerShSession
- Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException
sendSubscribeNotificationsAnswer
public void sendSubscribeNotificationsAnswer(SubscribeNotificationsAnswer answer)
throws InternalException,
IllegalDiameterStateException,
RouteException,
OverloadException
- Specified by:
sendSubscribeNotificationsAnswer in interface ServerShSession
- Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException
sendUserDataAnswer
public void sendUserDataAnswer(UserDataAnswer answer)
throws InternalException,
IllegalDiameterStateException,
RouteException,
OverloadException
- Specified by:
sendUserDataAnswer in interface ServerShSession
- 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>
processRequest
public Answer processRequest(Request request)
- Specified by:
processRequest in interface NetworkReqListener
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
isStateless
public boolean isStateless()
- Specified by:
isStateless in interface AppSession
send
protected void send(org.jdiameter.server.impl.app.sh.Event.Type type,
AppEvent request,
AppEvent answer)
throws InternalException
- Throws:
InternalException
dispatchEvent
protected void dispatchEvent(AppEvent event)
throws InternalException
- Throws:
InternalException
release
public void release()
- Specified by:
release in interface BaseSession- Overrides:
release in class ShSession
extractExpiryTime
protected long extractExpiryTime(Message answer)
isReplicable
public boolean isReplicable()
- Specified by:
isReplicable in interface BaseSession- Overrides:
isReplicable in class AppSessionImpl
hashCode
public int hashCode()
- Overrides:
hashCode in class AppSessionImpl
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals in class AppSessionImpl
onTimer
public void onTimer(java.lang.String timerName)
- Specified by:
onTimer in class AppSessionImpl
Copyright © 2014. All Rights Reserved.