private void initLocalFSM() {
        this.localFSM = new FSM(this.name + "_LOCAL");

        // Define states
        this.localFSM.createState(AsState.DOWN.toString()).setOnEnter(new SEHLocalAsStateEnterDown(this));
        this.localFSM.createState(AsState.ACTIVE.toString()).setOnEnter(new SEHLocalAsStateEnterActive(this));
        this.localFSM.createState(AsState.INACTIVE.toString()).setOnEnter(new SEHLocalAsStateEnterInactive(this));
        this.localFSM.createState(AsState.PENDING.toString()).setOnTimeOut(new RemAsStatePenTimeout(this, this.localFSM), 2000)
                .setOnEnter(new SEHLocalAsStateEnterPen(this, this.localFSM));

        this.localFSM.setStart(AsState.DOWN.toString());
        this.localFSM.setEnd(AsState.DOWN.toString());
        // Define Transitions

        // ******************************************************************/
        // STATE DOWN /
        // ******************************************************************/
        this.localFSM.createTransition(TransitionState.ASP_UP, AsState.DOWN.toString(), AsState.INACTIVE.toString())
                .setHandler(new THLocalAsDwnToInact(this, this.localFSM));
        this.localFSM.createTransition(TransitionState.ASP_DOWN, AsState.DOWN.toString(), AsState.DOWN.toString());

        // ******************************************************************/
        // STATE INACTIVE /
        // ******************************************************************/
        // TODO : Add Pluggable policy for AS?
        this.localFSM.createTransition(TransitionState.ASP_ACTIVE, AsState.INACTIVE.toString(), AsState.ACTIVE.toString())
                .setHandler(new THLocalAsInactToAct(this, this.localFSM));

        this.localFSM.createTransition(TransitionState.ASP_DOWN, AsState.INACTIVE.toString(), AsState.DOWN.toString())
                .setHandler(new THLocalAsInactToDwn(this, this.localFSM));

        this.localFSM.createTransition(TransitionState.ASP_UP, AsState.INACTIVE.toString(), AsState.INACTIVE.toString())
                .setHandler(new THLocalAsInactToInact(this, this.localFSM));

        // ******************************************************************/
        // STATE ACTIVE /
        // ******************************************************************/
        this.localFSM.createTransition(TransitionState.ASP_INACTIVE, AsState.ACTIVE.toString(), AsState.PENDING.toString())
                .setHandler(new THLocalAsActToPendRemAspInac(this, this.localFSM));

        this.localFSM.createTransition(TransitionState.ASP_DOWN, AsState.ACTIVE.toString(), AsState.PENDING.toString())
                .setHandler(new THLocalAsActToPendRemAspDwn(this, this.localFSM));

        this.localFSM.createTransition(TransitionState.ASP_ACTIVE, AsState.ACTIVE.toString(), AsState.ACTIVE.toString())
                .setHandler(new THLocalAsActToActRemAspAct(this, this.localFSM));

        this.localFSM.createTransition(TransitionState.ASP_UP, AsState.ACTIVE.toString(), AsState.PENDING.toString())
                .setHandler(new THLocalAsActToPendRemAspInac(this, this.localFSM));

        // ******************************************************************/
        // STATE PENDING /
        // ******************************************************************/
        this.localFSM.createTransition(TransitionState.ASP_DOWN, AsState.PENDING.toString(), AsState.DOWN.toString())
                .setHandler(new THNoTrans());

        this.localFSM.createTransition(TransitionState.ASP_UP, AsState.PENDING.toString(), AsState.INACTIVE.toString())
                .setHandler(new THNoTrans());

        this.localFSM.createTransition(TransitionState.ASP_ACTIVE, AsState.PENDING.toString(), AsState.ACTIVE.toString())
                .setHandler(new THLocalAsPendToAct(this, this.localFSM));

        this.localFSM.createTransition(TransitionState.AS_DOWN, AsState.PENDING.toString(), AsState.DOWN.toString());
        this.localFSM.createTransition(TransitionState.AS_INACTIVE, AsState.PENDING.toString(), AsState.INACTIVE.toString());
    }
private void initLocalFSM ( ) { this . localFSM = new FSM ( this . name + "_LOCAL" ) ; this . localFSM . createState ( AsState . DOWN . toString ( ) ) . setOnEnter ( new SEHLocalAsStateEnterDown ( this ) ) ; this . localFSM . createState ( AsState . ACTIVE . toString ( ) ) . setOnEnter ( new SEHLocalAsStateEnterActive ( this ) ) ; this . localFSM . createState ( AsState . INACTIVE . toString ( ) ) . setOnEnter ( new SEHLocalAsStateEnterInactive ( this ) ) ; this . localFSM . createState ( AsState . PENDING . toString ( ) ) . setOnTimeOut ( new RemAsStatePenTimeout ( this , this . localFSM ) , 2000 ) . setOnEnter ( new SEHLocalAsStateEnterPen ( this , this . localFSM ) ) ; this . localFSM . setStart ( AsState . DOWN . toString ( ) ) ; this . localFSM . setEnd ( AsState . DOWN . toString ( ) ) ; this . localFSM . createTransition ( TransitionState . ASP_UP , AsState . DOWN . toString ( ) , AsState . INACTIVE . toString ( ) ) . setHandler ( new THLocalAsDwnToInact ( this , this . localFSM ) ) ; this . localFSM . createTransition ( TransitionState . ASP_DOWN , AsState . DOWN . toString ( ) , AsState . DOWN . toString ( ) ) ; this . localFSM . createTransition ( TransitionState . ASP_ACTIVE , AsState . INACTIVE . toString ( ) , AsState . ACTIVE . toString ( ) ) . setHandler ( new THLocalAsInactToAct ( this , this . localFSM ) ) ; this . localFSM . createTransition ( TransitionState . ASP_DOWN , AsState . INACTIVE . toString ( ) , AsState . DOWN . toString ( ) ) . setHandler ( new THLocalAsInactToDwn ( this , this . localFSM ) ) ; this . localFSM . createTransition ( TransitionState . ASP_UP , AsState . INACTIVE . toString ( ) , AsState . INACTIVE . toString ( ) ) . setHandler ( new THLocalAsInactToInact ( this , this . localFSM ) ) ; this . localFSM . createTransition ( TransitionState . ASP_INACTIVE , AsState . ACTIVE . toString ( ) , AsState . PENDING . toString ( ) ) . setHandler ( new THLocalAsActToPendRemAspInac ( this , this . localFSM ) ) ; this . localFSM . createTransition ( TransitionState . ASP_DOWN , AsState . ACTIVE . toString ( ) , AsState . PENDING . toString ( ) ) . setHandler ( new THLocalAsActToPendRemAspDwn ( this , this . localFSM ) ) ; this . localFSM . createTransition ( TransitionState . ASP_ACTIVE , AsState . ACTIVE . toString ( ) , AsState . ACTIVE . toString ( ) ) . setHandler ( new THLocalAsActToActRemAspAct ( this , this . localFSM ) ) ; this . localFSM . createTransition ( TransitionState . ASP_UP , AsState . ACTIVE . toString ( ) , AsState . PENDING . toString ( ) ) . setHandler ( new THLocalAsActToPendRemAspInac ( this , this . localFSM ) ) ; this . localFSM . createTransition ( TransitionState . ASP_DOWN , AsState . PENDING . toString ( ) , AsState . DOWN . toString ( ) ) . setHandler ( new THNoTrans ( ) ) ; this . localFSM . createTransition ( TransitionState . ASP_UP , AsState . PENDING . toString ( ) , AsState . INACTIVE . toString ( ) ) . setHandler ( new THNoTrans ( ) ) ; this . localFSM . createTransition ( TransitionState . ASP_ACTIVE , AsState . PENDING . toString ( ) , AsState . ACTIVE . toString ( ) ) . setHandler ( new THLocalAsPendToAct ( this , this . localFSM ) ) ; this . localFSM . createTransition ( TransitionState . AS_DOWN , AsState . PENDING . toString ( ) , AsState . DOWN . toString ( ) ) ; this . localFSM . createTransition ( TransitionState . AS_INACTIVE , AsState . PENDING . toString ( ) , AsState . INACTIVE . toString ( ) ) ; }
Initialize FSM for SGW side