Java 类org.springframework.boot.devtools.livereload.LiveReloadServer 实例源码

项目:saito    文件:LiveReloadPlugin.java   
@Override
public void start(Saito saito, List<? extends SaitoFile> sources) {
    log.info("Starting Livereload");
    isEnabled = cfg.isLiveReloadEnabled();

    if (isEnabled) {
        try {
            liveReloadServer = new LiveReloadServer();
            liveReloadServer.start();
        } catch (IOException e) {
            log.error("Problem starting LiveReload", e);
        }
    }
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:LocalDevToolsAutoConfiguration.java   
@Bean
@RestartScope
@ConditionalOnMissingBean
public LiveReloadServer liveReloadServer() {
    return new LiveReloadServer(this.properties.getLivereload().getPort(),
            Restarter.getInstance().getThreadFactory());
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:RemoteClientConfiguration.java   
@Bean
@RestartScope
@ConditionalOnMissingBean
public LiveReloadServer liveReloadServer() {
    return new LiveReloadServer(this.properties.getLivereload().getPort(),
            Restarter.getInstance().getThreadFactory());
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:LocalDevToolsAutoConfigurationTests.java   
@Test
public void liveReloadTriggeredOnContextRefresh() throws Exception {
    this.context = initializeAndRun(ConfigWithMockLiveReload.class);
    LiveReloadServer server = this.context.getBean(LiveReloadServer.class);
    reset(server);
    this.context.publishEvent(new ContextRefreshedEvent(this.context));
    verify(server).triggerReload();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:LocalDevToolsAutoConfigurationTests.java   
@Test
public void liveReloadTriggeredOnClassPathChangeWithoutRestart() throws Exception {
    this.context = initializeAndRun(ConfigWithMockLiveReload.class);
    LiveReloadServer server = this.context.getBean(LiveReloadServer.class);
    reset(server);
    ClassPathChangedEvent event = new ClassPathChangedEvent(this.context,
            Collections.<ChangedFiles>emptySet(), false);
    this.context.publishEvent(event);
    verify(server).triggerReload();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:LocalDevToolsAutoConfigurationTests.java   
@Test
public void liveReloadNotTriggeredOnClassPathChangeWithRestart() throws Exception {
    this.context = initializeAndRun(ConfigWithMockLiveReload.class);
    LiveReloadServer server = this.context.getBean(LiveReloadServer.class);
    reset(server);
    ClassPathChangedEvent event = new ClassPathChangedEvent(this.context,
            Collections.<ChangedFiles>emptySet(), true);
    this.context.publishEvent(event);
    verify(server, never()).triggerReload();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:OptionalLiveReloadServerTests.java   
@Test
public void serverWontStart() throws Exception {
    LiveReloadServer delegate = mock(LiveReloadServer.class);
    OptionalLiveReloadServer server = new OptionalLiveReloadServer(delegate);
    willThrow(new RuntimeException("Error")).given(delegate).start();
    server.startServer();
    server.triggerReload();
    verify(delegate, never()).triggerReload();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:RemoteClientConfigurationTests.java   
@Test
public void liveReloadOnClassPathChanged() throws Exception {
    configure();
    Set<ChangedFiles> changeSet = new HashSet<ChangedFiles>();
    ClassPathChangedEvent event = new ClassPathChangedEvent(this, changeSet, false);
    this.context.publishEvent(event);
    LiveReloadConfiguration configuration = this.context
            .getBean(LiveReloadConfiguration.class);
    configuration.getExecutor().shutdown();
    configuration.getExecutor().awaitTermination(2, TimeUnit.SECONDS);
    LiveReloadServer server = this.context.getBean(LiveReloadServer.class);
    verify(server).triggerReload();
}
项目:spring-boot-concourse    文件:LocalDevToolsAutoConfiguration.java   
@Bean
@RestartScope
@ConditionalOnMissingBean
public LiveReloadServer liveReloadServer() {
    return new LiveReloadServer(this.properties.getLivereload().getPort(),
            Restarter.getInstance().getThreadFactory());
}
项目:spring-boot-concourse    文件:RemoteClientConfiguration.java   
@Bean
@RestartScope
@ConditionalOnMissingBean
public LiveReloadServer liveReloadServer() {
    return new LiveReloadServer(this.properties.getLivereload().getPort(),
            Restarter.getInstance().getThreadFactory());
}
项目:spring-boot-concourse    文件:LocalDevToolsAutoConfigurationTests.java   
@Test
public void liveReloadTriggeredOnContextRefresh() throws Exception {
    this.context = initializeAndRun(ConfigWithMockLiveReload.class);
    LiveReloadServer server = this.context.getBean(LiveReloadServer.class);
    reset(server);
    this.context.publishEvent(new ContextRefreshedEvent(this.context));
    verify(server).triggerReload();
}
项目:spring-boot-concourse    文件:LocalDevToolsAutoConfigurationTests.java   
@Test
public void liveReloadTriggeredOnClassPathChangeWithoutRestart() throws Exception {
    this.context = initializeAndRun(ConfigWithMockLiveReload.class);
    LiveReloadServer server = this.context.getBean(LiveReloadServer.class);
    reset(server);
    ClassPathChangedEvent event = new ClassPathChangedEvent(this.context,
            Collections.<ChangedFiles>emptySet(), false);
    this.context.publishEvent(event);
    verify(server).triggerReload();
}
项目:spring-boot-concourse    文件:LocalDevToolsAutoConfigurationTests.java   
@Test
public void liveReloadNotTriggeredOnClassPathChangeWithRestart() throws Exception {
    this.context = initializeAndRun(ConfigWithMockLiveReload.class);
    LiveReloadServer server = this.context.getBean(LiveReloadServer.class);
    reset(server);
    ClassPathChangedEvent event = new ClassPathChangedEvent(this.context,
            Collections.<ChangedFiles>emptySet(), true);
    this.context.publishEvent(event);
    verify(server, never()).triggerReload();
}
项目:spring-boot-concourse    文件:OptionalLiveReloadServerTests.java   
@Test
public void serverWontStart() throws Exception {
    LiveReloadServer delegate = mock(LiveReloadServer.class);
    OptionalLiveReloadServer server = new OptionalLiveReloadServer(delegate);
    willThrow(new RuntimeException("Error")).given(delegate).start();
    server.startServer();
    server.triggerReload();
    verify(delegate, never()).triggerReload();
}
项目:spring-boot-concourse    文件:RemoteClientConfigurationTests.java   
@Test
public void liveReloadOnClassPathChanged() throws Exception {
    configure();
    Set<ChangedFiles> changeSet = new HashSet<ChangedFiles>();
    ClassPathChangedEvent event = new ClassPathChangedEvent(this, changeSet, false);
    this.context.publishEvent(event);
    LiveReloadConfiguration configuration = this.context
            .getBean(LiveReloadConfiguration.class);
    configuration.getExecutor().shutdown();
    configuration.getExecutor().awaitTermination(2, TimeUnit.SECONDS);
    LiveReloadServer server = this.context.getBean(LiveReloadServer.class);
    verify(server).triggerReload();
}
项目:contestparser    文件:LocalDevToolsAutoConfiguration.java   
@Bean
@RestartScope
@ConditionalOnMissingBean
public LiveReloadServer liveReloadServer() {
    return new LiveReloadServer(this.properties.getLivereload().getPort(),
            Restarter.getInstance().getThreadFactory());
}
项目:contestparser    文件:RemoteClientConfiguration.java   
@Bean
@RestartScope
@ConditionalOnMissingBean
public LiveReloadServer liveReloadServer() {
    return new LiveReloadServer(this.properties.getLivereload().getPort(),
            Restarter.getInstance().getThreadFactory());
}
项目:contestparser    文件:LocalDevToolsAutoConfigurationTests.java   
@Test
public void liveReloadTriggeredOnContextRefresh() throws Exception {
    this.context = initializeAndRun(ConfigWithMockLiveReload.class);
    LiveReloadServer server = this.context.getBean(LiveReloadServer.class);
    reset(server);
    this.context.publishEvent(new ContextRefreshedEvent(this.context));
    verify(server).triggerReload();
}
项目:contestparser    文件:LocalDevToolsAutoConfigurationTests.java   
@Test
public void liveReloadTriggerdOnClassPathChangeWithoutRestart() throws Exception {
    this.context = initializeAndRun(ConfigWithMockLiveReload.class);
    LiveReloadServer server = this.context.getBean(LiveReloadServer.class);
    reset(server);
    ClassPathChangedEvent event = new ClassPathChangedEvent(this.context,
            Collections.<ChangedFiles>emptySet(), false);
    this.context.publishEvent(event);
    verify(server).triggerReload();
}
项目:contestparser    文件:LocalDevToolsAutoConfigurationTests.java   
@Test
public void liveReloadNotTriggerdOnClassPathChangeWithRestart() throws Exception {
    this.context = initializeAndRun(ConfigWithMockLiveReload.class);
    LiveReloadServer server = this.context.getBean(LiveReloadServer.class);
    reset(server);
    ClassPathChangedEvent event = new ClassPathChangedEvent(this.context,
            Collections.<ChangedFiles>emptySet(), true);
    this.context.publishEvent(event);
    verify(server, never()).triggerReload();
}
项目:contestparser    文件:OptionalLiveReloadServerTests.java   
@Test
public void serverWontStart() throws Exception {
    LiveReloadServer delegate = mock(LiveReloadServer.class);
    OptionalLiveReloadServer server = new OptionalLiveReloadServer(delegate);
    willThrow(new RuntimeException("Error")).given(delegate).start();
    server.startServer();
    server.triggerReload();
    verify(delegate, never()).triggerReload();
}
项目:contestparser    文件:RemoteClientConfigurationTests.java   
@Test
public void liveReloadOnClassPathChanged() throws Exception {
    configure();
    Set<ChangedFiles> changeSet = new HashSet<ChangedFiles>();
    ClassPathChangedEvent event = new ClassPathChangedEvent(this, changeSet, false);
    this.context.publishEvent(event);
    LiveReloadConfiguration configuration = this.context
            .getBean(LiveReloadConfiguration.class);
    configuration.getExecutor().shutdown();
    configuration.getExecutor().awaitTermination(2, TimeUnit.SECONDS);
    LiveReloadServer server = this.context.getBean(LiveReloadServer.class);
    verify(server).triggerReload();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:LocalDevToolsAutoConfigurationTests.java   
@Test
public void liveReloadServer() throws Exception {
    this.context = initializeAndRun(Config.class);
    LiveReloadServer server = this.context.getBean(LiveReloadServer.class);
    assertThat(server.isStarted()).isTrue();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:LocalDevToolsAutoConfigurationTests.java   
@Bean
public LiveReloadServer liveReloadServer() {
    return mock(LiveReloadServer.class);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:RemoteClientConfigurationTests.java   
@Bean
public LiveReloadServer liveReloadServer() {
    return mock(LiveReloadServer.class);
}
项目:spring-boot-concourse    文件:LocalDevToolsAutoConfigurationTests.java   
@Test
public void liveReloadServer() throws Exception {
    this.context = initializeAndRun(Config.class);
    LiveReloadServer server = this.context.getBean(LiveReloadServer.class);
    assertThat(server.isStarted()).isTrue();
}
项目:spring-boot-concourse    文件:LocalDevToolsAutoConfigurationTests.java   
@Bean
public LiveReloadServer liveReloadServer() {
    return mock(LiveReloadServer.class);
}
项目:spring-boot-concourse    文件:RemoteClientConfigurationTests.java   
@Bean
public LiveReloadServer liveReloadServer() {
    return mock(LiveReloadServer.class);
}
项目:contestparser    文件:LocalDevToolsAutoConfigurationTests.java   
@Test
public void liveReloadServer() throws Exception {
    this.context = initializeAndRun(Config.class);
    LiveReloadServer server = this.context.getBean(LiveReloadServer.class);
    assertThat(server.isStarted(), equalTo(true));
}
项目:contestparser    文件:LocalDevToolsAutoConfigurationTests.java   
@Bean
public LiveReloadServer liveReloadServer() {
    return mock(LiveReloadServer.class);
}
项目:contestparser    文件:RemoteClientConfigurationTests.java   
@Bean
public LiveReloadServer liveReloadServer() {
    return mock(LiveReloadServer.class);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:OptionalLiveReloadServer.java   
/**
 * Create a new {@link OptionalLiveReloadServer} instance.
 * @param server the server to manage or {@code null}
 */
public OptionalLiveReloadServer(LiveReloadServer server) {
    this.server = server;
}
项目:spring-boot-concourse    文件:OptionalLiveReloadServer.java   
/**
 * Create a new {@link OptionalLiveReloadServer} instance.
 * @param server the server to manage or {@code null}
 */
public OptionalLiveReloadServer(LiveReloadServer server) {
    this.server = server;
}
项目:contestparser    文件:OptionalLiveReloadServer.java   
/**
 * Create a new {@link OptionalLiveReloadServer} instance.
 * @param server the server to manage or {@code null}
 */
public OptionalLiveReloadServer(LiveReloadServer server) {
    this.server = server;
}