@Test public void testVerifyCandidates_noExecutor() { this.targetConfigurator.verifyCandidates(); Mockito.verifyZeroInteractions( this.executor ); }
@Override public void verifyCandidates() { if( this.executor == null ) return; for( Map.Entry<String,TargetConfiugrationBean> entry : this.candidates.entrySet()) { Instance scopedInstance = entry.getValue().scopedInstance; TargetHandlerParameters parameters = entry.getValue().parameters; File script = parameters.getTargetConfigurationScript(); if( scopedInstance.data.containsKey( Instance.READY_FOR_CFG_MARKER )) { scopedInstance.data.remove( Instance.READY_FOR_CFG_MARKER ); if( script != null && script.exists() && this.targetHandlerResolver != null ) this.executor.execute( new ConfigurationRunnable( parameters, scopedInstance, this.targetHandlerResolver )); this.candidates.remove( entry.getKey()); } } }
TargetConfiguratorImpl implements ITargetConfigurator { @Override public void verifyCandidates() { if( this.executor == null ) return; for( Map.Entry<String,TargetConfiugrationBean> entry : this.candidates.entrySet()) { Instance scopedInstance = entry.getValue().scopedInstance; TargetHandlerParameters parameters = entry.getValue().parameters; File script = parameters.getTargetConfigurationScript(); if( scopedInstance.data.containsKey( Instance.READY_FOR_CFG_MARKER )) { scopedInstance.data.remove( Instance.READY_FOR_CFG_MARKER ); if( script != null && script.exists() && this.targetHandlerResolver != null ) this.executor.execute( new ConfigurationRunnable( parameters, scopedInstance, this.targetHandlerResolver )); this.candidates.remove( entry.getKey()); } } } }
TargetConfiguratorImpl implements ITargetConfigurator { @Override public void verifyCandidates() { if( this.executor == null ) return; for( Map.Entry<String,TargetConfiugrationBean> entry : this.candidates.entrySet()) { Instance scopedInstance = entry.getValue().scopedInstance; TargetHandlerParameters parameters = entry.getValue().parameters; File script = parameters.getTargetConfigurationScript(); if( scopedInstance.data.containsKey( Instance.READY_FOR_CFG_MARKER )) { scopedInstance.data.remove( Instance.READY_FOR_CFG_MARKER ); if( script != null && script.exists() && this.targetHandlerResolver != null ) this.executor.execute( new ConfigurationRunnable( parameters, scopedInstance, this.targetHandlerResolver )); this.candidates.remove( entry.getKey()); } } }  }
TargetConfiguratorImpl implements ITargetConfigurator { @Override public void verifyCandidates() { if( this.executor == null ) return; for( Map.Entry<String,TargetConfiugrationBean> entry : this.candidates.entrySet()) { Instance scopedInstance = entry.getValue().scopedInstance; TargetHandlerParameters parameters = entry.getValue().parameters; File script = parameters.getTargetConfigurationScript(); if( scopedInstance.data.containsKey( Instance.READY_FOR_CFG_MARKER )) { scopedInstance.data.remove( Instance.READY_FOR_CFG_MARKER ); if( script != null && script.exists() && this.targetHandlerResolver != null ) this.executor.execute( new ConfigurationRunnable( parameters, scopedInstance, this.targetHandlerResolver )); this.candidates.remove( entry.getKey()); } } }  @Override void start(); @Override void stop(); void setTargetHandlerResolver( ITargetHandlerResolver targetHandlerResolver ); @Override void reportCandidate( TargetHandlerParameters parameters, Instance scopedInstance ); @Override void cancelCandidate( TargetHandlerParameters parameters, Instance scopedInstance ); @Override void verifyCandidates(); }
TargetConfiguratorImpl implements ITargetConfigurator { @Override public void verifyCandidates() { if( this.executor == null ) return; for( Map.Entry<String,TargetConfiugrationBean> entry : this.candidates.entrySet()) { Instance scopedInstance = entry.getValue().scopedInstance; TargetHandlerParameters parameters = entry.getValue().parameters; File script = parameters.getTargetConfigurationScript(); if( scopedInstance.data.containsKey( Instance.READY_FOR_CFG_MARKER )) { scopedInstance.data.remove( Instance.READY_FOR_CFG_MARKER ); if( script != null && script.exists() && this.targetHandlerResolver != null ) this.executor.execute( new ConfigurationRunnable( parameters, scopedInstance, this.targetHandlerResolver )); this.candidates.remove( entry.getKey()); } } }  @Override void start(); @Override void stop(); void setTargetHandlerResolver( ITargetHandlerResolver targetHandlerResolver ); @Override void reportCandidate( TargetHandlerParameters parameters, Instance scopedInstance ); @Override void cancelCandidate( TargetHandlerParameters parameters, Instance scopedInstance ); @Override void verifyCandidates();  }