org.jdiameter.client.impl.app.rx
Class ClientRxSessionImpl
java.lang.Object
org.jdiameter.common.impl.app.AppSessionImpl
org.jdiameter.common.impl.app.rx.AppRxSessionImpl
org.jdiameter.client.impl.app.rx.ClientRxSessionImpl
- All Implemented Interfaces:
- AppSession, StateMachine, BaseSession, EventListener<Request,Answer>, NetworkReqListener, ClientRxSession
public class ClientRxSessionImpl
- extends AppRxSessionImpl
- implements ClientRxSession, NetworkReqListener, EventListener<Request,Answer>
3GPP IMS Rx Reference Point Client Session implementation
- Author:
- Richard Good , Alexandre Mendonca , Bartosz Baranowski
| 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 IRxMessageFactory factory
listener
protected transient ClientRxSessionListener listener
context
protected transient IClientRxSessionContext context
parser
protected transient IMessageParser parser
sessionData
protected IClientRxSessionData sessionData
authAppIds
protected long[] authAppIds
isEventBased
protected boolean isEventBased
buffer
protected byte[] buffer
originHost
protected java.lang.String originHost
originRealm
protected java.lang.String originRealm
temporaryErrorCodes
protected static final java.util.Set<java.lang.Long> temporaryErrorCodes
eventQueue
protected java.util.ArrayList<Event> eventQueue
ClientRxSessionImpl
public ClientRxSessionImpl(IClientRxSessionData sessionData,
IRxMessageFactory fct,
ISessionFactory sf,
ClientRxSessionListener lst,
IClientRxSessionContext ctx,
StateChangeListener<AppSession> stLst)
sendAARequest
public void sendAARequest(RxAARequest request)
throws InternalException,
IllegalDiameterStateException,
RouteException,
OverloadException
- Specified by:
sendAARequest in interface ClientRxSession
- Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException
sendSessionTermRequest
public void sendSessionTermRequest(RxSessionTermRequest request)
throws InternalException,
IllegalDiameterStateException,
RouteException,
OverloadException
- Specified by:
sendSessionTermRequest in interface ClientRxSession
- Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException
sendReAuthAnswer
public void sendReAuthAnswer(RxReAuthAnswer answer)
throws InternalException,
IllegalDiameterStateException,
RouteException,
OverloadException
- Specified by:
sendReAuthAnswer in interface ClientRxSession
- Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException
sendAbortSessionAnswer
public void sendAbortSessionAnswer(RxAbortSessionAnswer answer)
throws InternalException,
IllegalDiameterStateException,
RouteException,
OverloadException
- Specified by:
sendAbortSessionAnswer in interface ClientRxSession
- Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException
isStateless
public boolean isStateless()
- Specified by:
isStateless in interface AppSession
isEventBased
public boolean isEventBased()
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
handleEventForEventBased
protected boolean handleEventForEventBased(StateEvent event)
throws InternalException,
OverloadException
- Throws:
InternalException
OverloadException
handleEventForSessionBased
protected boolean handleEventForSessionBased(StateEvent event)
throws InternalException,
OverloadException
- Throws:
InternalException
OverloadException
processRequest
public Answer processRequest(Request request)
- Specified by:
processRequest in interface NetworkReqListener
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>
setState
protected void setState(ClientRxSessionState newState)
setState
protected void setState(ClientRxSessionState newState,
boolean release)
release
public void release()
- Specified by:
release in interface BaseSession- Overrides:
release in class AppRxSessionImpl
handleSendFailure
protected void handleSendFailure(java.lang.Exception e,
Event.Type eventType,
Message request)
throws java.lang.Exception
- Throws:
java.lang.Exception
handleFailureMessage
protected void handleFailureMessage(AppAnswerEvent event,
AppRequestEvent request,
Event.Type eventType)
dispatch
protected void dispatch()
- This makes checks on queue, moves it to proper state if event there is
present on Open state ;]
deliverRxAAAnswer
protected void deliverRxAAAnswer(RxAARequest request,
RxAAAnswer answer)
deliverRxSessionTermAnswer
protected void deliverRxSessionTermAnswer(RxSessionTermRequest request,
RxSessionTermAnswer answer)
deliverReAuthRequest
protected void deliverReAuthRequest(RxReAuthRequest request)
deliverAbortSessionRequest
protected void deliverAbortSessionRequest(RxAbortSessionRequest request)
dispatchEvent
protected void dispatchEvent(AppEvent event)
throws InternalException,
IllegalDiameterStateException,
RouteException,
OverloadException
- Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException
isProvisional
protected boolean isProvisional(long resultCode)
isSuccess
protected boolean isSuccess(long resultCode)
isFailure
protected boolean isFailure(long code)
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.