org.jdiameter.client.impl.fsm
Class PeerFSMImpl

java.lang.Object
  extended by org.jdiameter.client.impl.fsm.PeerFSMImpl
All Implemented Interfaces:
org.jdiameter.api.app.StateMachine, IStateMachine
Direct Known Subclasses:
PeerFSMImpl

public class PeerFSMImpl
extends java.lang.Object
implements IStateMachine


Nested Class Summary
static class PeerFSMImpl.CIntState
           
 
Field Summary
protected  long CEA_TIMEOUT
           
protected  IContext context
           
protected  long DPA_TIMEOUT
           
protected  long DWA_TIMEOUT
           
protected  java.util.concurrent.LinkedBlockingQueue<org.jdiameter.api.app.StateEvent> eventQueue
           
protected  long IAC_TIMEOUT
           
protected  java.util.concurrent.ConcurrentLinkedQueue<org.jdiameter.api.app.StateChangeListener> listeners
           
protected  java.util.logging.Logger logger
           
protected  java.util.Random random
           
protected  long REC_TIMEOUT
           
protected  PeerFSMImpl.CIntState state
           
protected  org.jdiameter.api.app.StateEvent timeOutEvent
           
protected  long timer
           
protected  boolean watchdogSent
           
 
Constructor Summary
PeerFSMImpl(IContext aContext, java.util.concurrent.Executor executor, org.jdiameter.api.Configuration config)
           
 
Method Summary
 void addStateChangeNotification(org.jdiameter.api.app.StateChangeListener stateChangeListener)
           
 double getQueueInfo()
          This method returns occupancy of event queue
<E> E
getState(java.lang.Class<E> a)
           
protected  org.jdiameter.api.app.State[] getStates()
           
 boolean handleEvent(org.jdiameter.api.app.StateEvent event)
           
protected  void loadTimeOuts(org.jdiameter.api.Configuration config)
           
 void removeStateChangeNotification(org.jdiameter.api.app.StateChangeListener stateChangeListener)
           
 void remStateChangeNotification(org.jdiameter.api.app.StateChangeListener stateChangeListener)
           
protected  void swithToNextState(PeerFSMImpl.CIntState newState)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

protected java.util.logging.Logger logger

listeners

protected java.util.concurrent.ConcurrentLinkedQueue<org.jdiameter.api.app.StateChangeListener> listeners

eventQueue

protected java.util.concurrent.LinkedBlockingQueue<org.jdiameter.api.app.StateEvent> eventQueue

state

protected PeerFSMImpl.CIntState 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 org.jdiameter.api.app.StateEvent timeOutEvent

random

protected java.util.Random random

context

protected IContext context
Constructor Detail

PeerFSMImpl

public PeerFSMImpl(IContext aContext,
                   java.util.concurrent.Executor executor,
                   org.jdiameter.api.Configuration config)
Method Detail

removeStateChangeNotification

public void removeStateChangeNotification(org.jdiameter.api.app.StateChangeListener stateChangeListener)
Specified by:
removeStateChangeNotification in interface org.jdiameter.api.app.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(org.jdiameter.api.Configuration config)

addStateChangeNotification

public void addStateChangeNotification(org.jdiameter.api.app.StateChangeListener stateChangeListener)
Specified by:
addStateChangeNotification in interface org.jdiameter.api.app.StateMachine

remStateChangeNotification

public void remStateChangeNotification(org.jdiameter.api.app.StateChangeListener stateChangeListener)
Specified by:
remStateChangeNotification in interface IStateMachine

swithToNextState

protected void swithToNextState(PeerFSMImpl.CIntState newState)

handleEvent

public boolean handleEvent(org.jdiameter.api.app.StateEvent event)
                    throws java.lang.InternalError,
                           org.jdiameter.api.OverloadException
Specified by:
handleEvent in interface org.jdiameter.api.app.StateMachine
Throws:
java.lang.InternalError
org.jdiameter.api.OverloadException

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 org.jdiameter.api.app.StateMachine

getStates

protected org.jdiameter.api.app.State[] getStates()


Copyright © 2008. All Rights Reserved.