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, AppSession, StateMachine, BaseSession, 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
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
isEventBased
protected boolean isEventBased
requestTypeSet
protected boolean requestTypeSet
state
protected ClientCCASessionState state
sendAndStateLock
protected java.util.concurrent.locks.Lock sendAndStateLock
factory
protected transient ICCAMessageFactory factory
listener
protected transient ClientCCASessionListener listener
context
protected transient IClientCCASessionContext context
parser
protected transient IMessageParser parser
txTimerId
protected java.io.Serializable txTimerId
txTimerRequest
protected byte[] txTimerRequest
buffer
protected byte[] buffer
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
originHost
protected java.lang.String originHost
originRealm
protected java.lang.String originRealm
authAppIds
protected long[] authAppIds
gatheredRequestedAction
protected int gatheredRequestedAction
gatheredCCFH
protected int gatheredCCFH
gatheredDDFH
protected int gatheredDDFH
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
eventQueue
protected java.util.ArrayList<Event> eventQueue
ClientCCASessionImpl
public ClientCCASessionImpl(ICCAMessageFactory fct,
SessionFactory sf,
ClientCCASessionListener lst,
IClientCCASessionContext ctx,
StateChangeListener<AppSession> stLst)
ClientCCASessionImpl
public ClientCCASessionImpl(java.lang.String sessionId,
ICCAMessageFactory fct,
SessionFactory 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)
- Overrides:
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 event,
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
relink
public void relink(IContainer stack)
- Overrides:
relink in class AppCCASessionImpl
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals in class java.lang.Object
Copyright © 2010. All Rights Reserved.