@Test public void testProcessMsgNotifInstanceChanged_rootIsNotDeployed() throws Exception { this.managerWrapper.addManagedApplication( new ManagedApplication( this.app )); this.app.getMySqlVm().setStatus( InstanceStatus.NOT_DEPLOYED ); MsgNotifInstanceChanged msg = new MsgNotifInstanceChanged( this.app.getName(), this.app.getMySql()); msg.setNewStatus( InstanceStatus.DEPLOYED_STARTED ); this.processor.processMessage( msg ); Assert.assertEquals( InstanceStatus.NOT_DEPLOYED, this.app.getMySql().getStatus()); Assert.assertEquals( InstanceStatus.NOT_DEPLOYED, this.app.getMySqlVm().getStatus()); }
@Override public void processMessage( Message message ) { if( message instanceof MsgNotifMachineDown ) processMsgNotifMachineDown((MsgNotifMachineDown) message ); else if( message instanceof MsgNotifInstanceChanged ) processMsgNotifInstanceChanged((MsgNotifInstanceChanged) message ); else if( message instanceof MsgNotifInstanceRemoved ) processMsgNotifInstanceRemoved((MsgNotifInstanceRemoved) message ); else if( message instanceof MsgNotifHeartbeat ) processMsgNotifHeartbeat((MsgNotifHeartbeat) message ); else if(message instanceof MsgNotifAutonomic) processMsgMonitoringEvent((MsgNotifAutonomic) message ); else if( message instanceof MsgEcho ) this.manager.debugMngr().notifyMsgEchoReceived((MsgEcho) message ); else if( message instanceof MsgNotifLogs ) processMsgNotifLogs((MsgNotifLogs) message ); else this.logger.warning( "The DM got an undetermined message to process: " + message.getClass().getName()); }
DmMessageProcessor extends AbstractMessageProcessor<IDmClient> { @Override public void processMessage( Message message ) { if( message instanceof MsgNotifMachineDown ) processMsgNotifMachineDown((MsgNotifMachineDown) message ); else if( message instanceof MsgNotifInstanceChanged ) processMsgNotifInstanceChanged((MsgNotifInstanceChanged) message ); else if( message instanceof MsgNotifInstanceRemoved ) processMsgNotifInstanceRemoved((MsgNotifInstanceRemoved) message ); else if( message instanceof MsgNotifHeartbeat ) processMsgNotifHeartbeat((MsgNotifHeartbeat) message ); else if(message instanceof MsgNotifAutonomic) processMsgMonitoringEvent((MsgNotifAutonomic) message ); else if( message instanceof MsgEcho ) this.manager.debugMngr().notifyMsgEchoReceived((MsgEcho) message ); else if( message instanceof MsgNotifLogs ) processMsgNotifLogs((MsgNotifLogs) message ); else this.logger.warning( "The DM got an undetermined message to process: " + message.getClass().getName()); } }
DmMessageProcessor extends AbstractMessageProcessor<IDmClient> { @Override public void processMessage( Message message ) { if( message instanceof MsgNotifMachineDown ) processMsgNotifMachineDown((MsgNotifMachineDown) message ); else if( message instanceof MsgNotifInstanceChanged ) processMsgNotifInstanceChanged((MsgNotifInstanceChanged) message ); else if( message instanceof MsgNotifInstanceRemoved ) processMsgNotifInstanceRemoved((MsgNotifInstanceRemoved) message ); else if( message instanceof MsgNotifHeartbeat ) processMsgNotifHeartbeat((MsgNotifHeartbeat) message ); else if(message instanceof MsgNotifAutonomic) processMsgMonitoringEvent((MsgNotifAutonomic) message ); else if( message instanceof MsgEcho ) this.manager.debugMngr().notifyMsgEchoReceived((MsgEcho) message ); else if( message instanceof MsgNotifLogs ) processMsgNotifLogs((MsgNotifLogs) message ); else this.logger.warning( "The DM got an undetermined message to process: " + message.getClass().getName()); } DmMessageProcessor( Manager manager ); }
DmMessageProcessor extends AbstractMessageProcessor<IDmClient> { @Override public void processMessage( Message message ) { if( message instanceof MsgNotifMachineDown ) processMsgNotifMachineDown((MsgNotifMachineDown) message ); else if( message instanceof MsgNotifInstanceChanged ) processMsgNotifInstanceChanged((MsgNotifInstanceChanged) message ); else if( message instanceof MsgNotifInstanceRemoved ) processMsgNotifInstanceRemoved((MsgNotifInstanceRemoved) message ); else if( message instanceof MsgNotifHeartbeat ) processMsgNotifHeartbeat((MsgNotifHeartbeat) message ); else if(message instanceof MsgNotifAutonomic) processMsgMonitoringEvent((MsgNotifAutonomic) message ); else if( message instanceof MsgEcho ) this.manager.debugMngr().notifyMsgEchoReceived((MsgEcho) message ); else if( message instanceof MsgNotifLogs ) processMsgNotifLogs((MsgNotifLogs) message ); else this.logger.warning( "The DM got an undetermined message to process: " + message.getClass().getName()); } DmMessageProcessor( Manager manager ); @Override void processMessage( Message message ); }
DmMessageProcessor extends AbstractMessageProcessor<IDmClient> { @Override public void processMessage( Message message ) { if( message instanceof MsgNotifMachineDown ) processMsgNotifMachineDown((MsgNotifMachineDown) message ); else if( message instanceof MsgNotifInstanceChanged ) processMsgNotifInstanceChanged((MsgNotifInstanceChanged) message ); else if( message instanceof MsgNotifInstanceRemoved ) processMsgNotifInstanceRemoved((MsgNotifInstanceRemoved) message ); else if( message instanceof MsgNotifHeartbeat ) processMsgNotifHeartbeat((MsgNotifHeartbeat) message ); else if(message instanceof MsgNotifAutonomic) processMsgMonitoringEvent((MsgNotifAutonomic) message ); else if( message instanceof MsgEcho ) this.manager.debugMngr().notifyMsgEchoReceived((MsgEcho) message ); else if( message instanceof MsgNotifLogs ) processMsgNotifLogs((MsgNotifLogs) message ); else this.logger.warning( "The DM got an undetermined message to process: " + message.getClass().getName()); } DmMessageProcessor( Manager manager ); @Override void processMessage( Message message );  }