org.jdiameter.client.impl.fsm
Class PeerFSMImpl
java.lang.Object
org.jdiameter.client.impl.fsm.PeerFSMImpl
- All Implemented Interfaces:
- StateMachine, IStateMachine
- Direct Known Subclasses:
- PeerFSMImpl
public class PeerFSMImpl
- extends java.lang.Object
- implements IStateMachine
- Author:
- erick.svenson@yahoo.com, Alexandre Mendonca , Bartosz Baranowski
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
dictionary
protected final Dictionary dictionary
listeners
protected java.util.concurrent.ConcurrentLinkedQueue<StateChangeListener> listeners
eventQueue
protected java.util.concurrent.LinkedBlockingQueue<StateEvent> eventQueue
state
protected FsmState state
watchdogSent
protected boolean watchdogSent
timer
protected long timer
CEA_TIMEOUT
protected long CEA_TIMEOUT
IAC_TIMEOUT
protected long IAC_TIMEOUT
REC_TIMEOUT
protected long REC_TIMEOUT
DWA_TIMEOUT
protected long DWA_TIMEOUT
DPA_TIMEOUT
protected long DPA_TIMEOUT
timeOutEvent
protected final StateEvent timeOutEvent
random
protected java.util.Random random
concurrentFactory
protected IConcurrentFactory concurrentFactory
context
protected IContext context
states
protected State[] states
predefSize
protected int predefSize
statisticFactory
protected IStatisticManager statisticFactory
queueStat
protected IStatistic queueStat
timeSumm
protected IStatisticRecord timeSumm
timeCount
protected IStatisticRecord timeCount
mustRun
protected boolean mustRun
numberOfThreadsRunning
protected java.util.concurrent.atomic.AtomicInteger numberOfThreadsRunning
PeerFSMImpl
public PeerFSMImpl(IContext aContext,
IConcurrentFactory concurrentFactory,
Configuration config,
IStatisticManager statisticFactory)
getStatistic
public IStatistic getStatistic()
- Specified by:
getStatistic in interface IStateMachine
removeStateChangeNotification
public void removeStateChangeNotification(StateChangeListener stateChangeListener)
- Specified by:
removeStateChangeNotification in interface StateMachine
getQueueInfo
public double getQueueInfo()
- Description copied from interface:
IStateMachine
- This method returns occupancy of event queue
- Specified by:
getQueueInfo in interface IStateMachine
- Returns:
- occupancy of event queue
loadTimeOuts
protected void loadTimeOuts(Configuration config)
addStateChangeNotification
public void addStateChangeNotification(StateChangeListener stateChangeListener)
- Specified by:
addStateChangeNotification in interface StateMachine
remStateChangeNotification
public void remStateChangeNotification(StateChangeListener stateChangeListener)
- Specified by:
remStateChangeNotification in interface IStateMachine
switchToNextState
protected void switchToNextState(FsmState newState)
handleEvent
public boolean handleEvent(StateEvent event)
throws java.lang.InternalError,
OverloadException
- Specified by:
handleEvent in interface StateMachine
- Throws:
java.lang.InternalError
OverloadException
setInActiveTimer
protected void setInActiveTimer()
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
getState
public <E> E getState(java.lang.Class<E> a)
- Specified by:
getState in interface StateMachine
getStates
protected State[] getStates()
Copyright © 2014. All Rights Reserved.