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:
- java.io.Serializable, org.jdiameter.api.app.AppSession, org.jdiameter.api.app.StateMachine, org.jdiameter.api.cca.ClientCCASession, org.jdiameter.api.EventListener<org.jdiameter.api.Request,org.jdiameter.api.Answer>, org.jdiameter.api.NetworkReqListener
public class ClientCCASessionImpl
- extends AppCCASessionImpl
- implements org.jdiameter.api.cca.ClientCCASession, org.jdiameter.api.NetworkReqListener, org.jdiameter.api.EventListener<org.jdiameter.api.Request,org.jdiameter.api.Answer>
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jdiameter.api.app.AppSession |
getCreationTime, getLastAccessedTime, getSessionAppId, getSessions, isValid |
| Methods inherited from interface org.jdiameter.api.app.StateMachine |
addStateChangeNotification, removeStateChangeNotification |
stateless
protected boolean stateless
statelessModeSet
protected boolean statelessModeSet
state
protected ClientCCASessionState state
factory
protected ICCAMessageFactory factory
originHost
protected java.lang.String originHost
originRealm
protected java.lang.String originRealm
sendAndStateLock
protected java.util.concurrent.locks.Lock sendAndStateLock
authAppIds
protected long[] authAppIds
listener
protected org.jdiameter.api.cca.ClientCCASessionListener listener
context
protected IClientCCASessionContext context
txFuture
protected java.util.concurrent.ScheduledFuture txFuture
temporaryErrorCodes
protected static final java.util.Set<java.lang.Integer> temporaryErrorCodes
gatheredCCFH
protected int gatheredCCFH
gatheredDDFH
protected int gatheredDDFH
gatheredRequestedAction
protected int gatheredRequestedAction
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
DIAMETER_END_USER_SERVICE_DENIED
protected static final int DIAMETER_END_USER_SERVICE_DENIED
- See Also:
- Constant Field Values
eventQueue
protected java.util.ArrayList<Event> eventQueue
ClientCCASessionImpl
public ClientCCASessionImpl(ICCAMessageFactory fct,
org.jdiameter.api.SessionFactory sf,
org.jdiameter.api.cca.ClientCCASessionListener lst)
ClientCCASessionImpl
public ClientCCASessionImpl(java.lang.String sessionId,
ICCAMessageFactory fct,
org.jdiameter.api.SessionFactory sf,
org.jdiameter.api.cca.ClientCCASessionListener lst)
getLocalCCFH
protected int getLocalCCFH()
getLocalDDFH
protected int getLocalDDFH()
sendCreditControlRequest
public void sendCreditControlRequest(org.jdiameter.api.cca.events.JCreditControlRequest request)
throws org.jdiameter.api.InternalException,
org.jdiameter.api.IllegalDiameterStateException,
org.jdiameter.api.RouteException,
org.jdiameter.api.OverloadException
- Specified by:
sendCreditControlRequest in interface org.jdiameter.api.cca.ClientCCASession
- Throws:
org.jdiameter.api.InternalException
org.jdiameter.api.IllegalDiameterStateException
org.jdiameter.api.RouteException
org.jdiameter.api.OverloadException
sendReAuthAnswer
public void sendReAuthAnswer(org.jdiameter.api.auth.events.ReAuthAnswer answer)
throws org.jdiameter.api.InternalException,
org.jdiameter.api.IllegalDiameterStateException,
org.jdiameter.api.RouteException,
org.jdiameter.api.OverloadException
- Specified by:
sendReAuthAnswer in interface org.jdiameter.api.cca.ClientCCASession
- Throws:
org.jdiameter.api.InternalException
org.jdiameter.api.IllegalDiameterStateException
org.jdiameter.api.RouteException
org.jdiameter.api.OverloadException
isStateless
public boolean isStateless()
- Specified by:
isStateless in interface org.jdiameter.api.app.AppSession
getState
public <E> E getState(java.lang.Class<E> stateType)
- Specified by:
getState in interface org.jdiameter.api.app.StateMachine
handleEvent
public boolean handleEvent(org.jdiameter.api.app.StateEvent event)
throws org.jdiameter.api.InternalException,
org.jdiameter.api.OverloadException
- Specified by:
handleEvent in interface org.jdiameter.api.app.StateMachine
- Throws:
org.jdiameter.api.InternalException
org.jdiameter.api.OverloadException
handleEventForEventBased
protected boolean handleEventForEventBased(org.jdiameter.api.app.StateEvent event)
throws org.jdiameter.api.InternalException,
org.jdiameter.api.OverloadException
- Throws:
org.jdiameter.api.InternalException
org.jdiameter.api.OverloadException
handleEventForSessionBased
protected boolean handleEventForSessionBased(org.jdiameter.api.app.StateEvent event)
throws org.jdiameter.api.InternalException,
org.jdiameter.api.OverloadException
- Throws:
org.jdiameter.api.InternalException
org.jdiameter.api.OverloadException
processRequest
public org.jdiameter.api.Answer processRequest(org.jdiameter.api.Request request)
- Specified by:
processRequest in interface org.jdiameter.api.NetworkReqListener
receivedSuccessMessage
public void receivedSuccessMessage(org.jdiameter.api.Request request,
org.jdiameter.api.Answer answer)
- Specified by:
receivedSuccessMessage in interface org.jdiameter.api.EventListener<org.jdiameter.api.Request,org.jdiameter.api.Answer>
timeoutExpired
public void timeoutExpired(org.jdiameter.api.Request request)
- Specified by:
timeoutExpired in interface org.jdiameter.api.EventListener<org.jdiameter.api.Request,org.jdiameter.api.Answer>
startTx
protected void startTx(org.jdiameter.api.cca.events.JCreditControlRequest request)
stopTx
protected void stopTx()
setState
protected void setState(ClientCCASessionState newState)
setState
protected void setState(ClientCCASessionState newState,
boolean release)
release
public void release()
- Specified by:
release in interface org.jdiameter.api.app.AppSession- Overrides:
release in class AppCCASessionImpl
handleSendFailure
protected void handleSendFailure(java.lang.Exception e,
Event.Type type,
org.jdiameter.api.Message request)
throws java.lang.Exception
- Throws:
java.lang.Exception
handleFailureMessage
protected void handleFailureMessage(org.jdiameter.api.cca.events.JCreditControlAnswer event,
org.jdiameter.api.cca.events.JCreditControlRequest request,
Event.Type type)
handleTxExpires
protected void handleTxExpires(org.jdiameter.api.Message m)
doEndChecks
protected void doEndChecks()
- This makes checks on queue, moves it to proper state if event there is
present on Open state ;]
deliverCCAnswer
protected void deliverCCAnswer(org.jdiameter.api.cca.events.JCreditControlRequest request,
org.jdiameter.api.cca.events.JCreditControlAnswer answer)
extractFHAVPs
protected void extractFHAVPs(org.jdiameter.api.cca.events.JCreditControlRequest request,
org.jdiameter.api.cca.events.JCreditControlAnswer answer)
deliverRAR
protected void deliverRAR(org.jdiameter.api.auth.events.ReAuthRequest request)
dispatchEvent
protected void dispatchEvent(org.jdiameter.api.app.AppEvent event)
throws org.jdiameter.api.InternalException,
org.jdiameter.api.IllegalDiameterStateException,
org.jdiameter.api.RouteException,
org.jdiameter.api.OverloadException
- Throws:
org.jdiameter.api.InternalException
org.jdiameter.api.IllegalDiameterStateException
org.jdiameter.api.RouteException
org.jdiameter.api.OverloadException
isProvisional
protected boolean isProvisional(long unsigned32)
isSuccess
protected boolean isSuccess(long code)
isFailure
protected boolean isFailure(long code)
Copyright © 2009. All Rights Reserved.