public void run() {
try {
DummyStateModelFactory stateModelFactory = new DummyStateModelFactory(0);
// StateMachineEngine genericStateMachineHandler =
// new StateMachineEngine();
StateMachineEngine stateMach = _manager.getStateMachineEngine();
stateMach.registerStateModelFactory(StateModelDefId.MasterSlave, stateModelFactory);
DummyLeaderStandbyStateModelFactory stateModelFactory1 =
new DummyLeaderStandbyStateModelFactory(10);
DummyOnlineOfflineStateModelFactory stateModelFactory2 =
new DummyOnlineOfflineStateModelFactory(10);
stateMach.registerStateModelFactory(StateModelDefId.LeaderStandby, stateModelFactory1);
stateMach.registerStateModelFactory(StateModelDefId.OnlineOffline, stateModelFactory2);
// _manager.getMessagingService()
// .registerMessageHandlerFactory(MessageType.STATE_TRANSITION.toString(),
// genericStateMachineHandler);
_manager.connect();