org.jdiameter.client.impl.app.cca
Class ClientCCASessionImpl
java.lang.Object
org.jdiameter.common.impl.app.AppSessionImpl
org.jdiameter.common.impl.app.cca.AppCCASessionImpl
org.jdiameter.client.impl.app.cca.ClientCCASessionImpl
- All Implemented Interfaces:
- AppSession, StateMachine, BaseSession, CCASession, ClientCCASession, EventListener<Request,Answer>, NetworkReqListener
public class ClientCCASessionImpl
- extends AppCCASessionImpl
- implements ClientCCASession, NetworkReqListener, EventListener<Request,Answer>
Client Credit-Control Application session implementation
- Author:
- Alexandre Mendonca , Bartosz Baranowski
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
sessionData
protected IClientCCASessionData sessionData
sendAndStateLock
protected java.util.concurrent.locks.Lock sendAndStateLock
eventQueue
protected java.util.ArrayList<Event> eventQueue
factory
protected ICCAMessageFactory factory
listener
protected ClientCCASessionListener listener
context
protected IClientCCASessionContext context
TX_TIMER_NAME
protected static final java.lang.String TX_TIMER_NAME
- See Also:
- Constant Field Values
TX_TIMER_DEFAULT_VALUE
protected static final long TX_TIMER_DEFAULT_VALUE
- See Also:
- Constant Field Values
authAppIds
protected long[] authAppIds
CCFH_TERMINATE
protected static final int CCFH_TERMINATE
- See Also:
- Constant Field Values
CCFH_CONTINUE
protected static final int CCFH_CONTINUE
- See Also:
- Constant Field Values
CCFH_RETRY_AND_TERMINATE
protected static final int CCFH_RETRY_AND_TERMINATE
- See Also:
- Constant Field Values
temporaryErrorCodes
protected static final java.util.Set<java.lang.Long> temporaryErrorCodes
ClientCCASessionImpl
public ClientCCASessionImpl(IClientCCASessionData data,
ICCAMessageFactory fct,
ISessionFactory sf,
ClientCCASessionListener lst,
IClientCCASessionContext ctx,
StateChangeListener<AppSession> stLst)
getLocalCCFH
protected int getLocalCCFH()
getLocalDDFH
protected int getLocalDDFH()
sendCreditControlRequest
public void sendCreditControlRequest(JCreditControlRequest request)
throws InternalException,
IllegalDiameterStateException,
RouteException,
OverloadException
- Specified by:
sendCreditControlRequest in interface ClientCCASession
- Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException
sendReAuthAnswer
public void sendReAuthAnswer(ReAuthAnswer answer)
throws InternalException,
IllegalDiameterStateException,
RouteException,
OverloadException
- Specified by:
sendReAuthAnswer in interface ClientCCASession
- 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>
startTx
protected void startTx(JCreditControlRequest request)
stopTx
protected void stopTx()
onTimer
public void onTimer(java.lang.String timerName)
- Specified by:
onTimer in class AppSessionImpl
setState
protected void setState(ClientCCASessionState newState)
setState
protected void setState(ClientCCASessionState newState,
boolean release)
release
public void release()
- Specified by:
release in interface BaseSession- Overrides:
release in class AppCCASessionImpl
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(JCreditControlAnswer answer,
JCreditControlRequest request,
Event.Type eventType)
handleTxExpires
protected void handleTxExpires(Message message)
dispatch
protected void dispatch()
- This makes checks on queue, moves it to proper state if event there is
present on Open state ;]
deliverCCAnswer
protected void deliverCCAnswer(JCreditControlRequest request,
JCreditControlAnswer answer)
extractFHAVPs
protected void extractFHAVPs(JCreditControlRequest request,
JCreditControlAnswer answer)
deliverRAR
protected void deliverRAR(ReAuthRequest 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
Copyright © 2014. All Rights Reserved.