org.jdiameter.client.impl.app.ro
Class ClientRoSessionImpl
java.lang.Object
org.jdiameter.common.impl.app.AppSessionImpl
org.jdiameter.common.impl.app.ro.AppRoSessionImpl
org.jdiameter.client.impl.app.ro.ClientRoSessionImpl
- All Implemented Interfaces:
- java.io.Serializable, AppSession, StateMachine, BaseSession, EventListener<Request,Answer>, NetworkReqListener, ClientRoSession
public class ClientRoSessionImpl
- extends AppRoSessionImpl
- implements ClientRoSession, 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 ClientRoSessionState state
sendAndStateLock
protected java.util.concurrent.locks.Lock sendAndStateLock
factory
protected transient IRoMessageFactory factory
listener
protected transient ClientRoSessionListener listener
context
protected transient IClientRoSessionContext 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
ClientRoSessionImpl
public ClientRoSessionImpl(IRoMessageFactory fct,
SessionFactory sf,
ClientRoSessionListener lst,
IClientRoSessionContext ctx,
StateChangeListener<AppSession> stLst)
ClientRoSessionImpl
public ClientRoSessionImpl(java.lang.String sessionId,
IRoMessageFactory fct,
SessionFactory sf,
ClientRoSessionListener lst,
IClientRoSessionContext ctx,
StateChangeListener<AppSession> stLst)
getLocalCCFH
protected int getLocalCCFH()
getLocalDDFH
protected int getLocalDDFH()
sendCreditControlRequest
public void sendCreditControlRequest(RoCreditControlRequest request)
throws InternalException,
IllegalDiameterStateException,
RouteException,
OverloadException
- Specified by:
sendCreditControlRequest in interface ClientRoSession
- Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException
sendReAuthAnswer
public void sendReAuthAnswer(ReAuthAnswer answer)
throws InternalException,
IllegalDiameterStateException,
RouteException,
OverloadException
- Specified by:
sendReAuthAnswer in interface ClientRoSession
- 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(RoCreditControlRequest request)
stopTx
protected void stopTx()
onTimer
public void onTimer(java.lang.String timerName)
- Overrides:
onTimer in class AppSessionImpl
setState
protected void setState(ClientRoSessionState newState)
setState
protected void setState(ClientRoSessionState newState,
boolean release)
release
public void release()
- Specified by:
release in interface BaseSession- Overrides:
release in class AppRoSessionImpl
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(RoCreditControlAnswer event,
RoCreditControlRequest 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 ;]
deliverRonswer
protected void deliverRonswer(RoCreditControlRequest request,
RoCreditControlAnswer answer)
extractFHAVPs
protected void extractFHAVPs(RoCreditControlRequest request,
RoCreditControlAnswer answer)
throws AvpDataException
- Throws:
AvpDataException
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 AppRoSessionImpl
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.