You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
845 B
30 lines
845 B
7 years ago
|
package com.fr.start.server;
|
||
|
|
||
|
import com.fr.event.EventDispatcher;
|
||
7 years ago
|
import com.fr.module.ModuleContext;
|
||
7 years ago
|
|
||
|
/**
|
||
7 years ago
|
* Created by juhaoyu on 2018/6/6.
|
||
7 years ago
|
*/
|
||
7 years ago
|
public abstract class FineEmbedServer {
|
||
7 years ago
|
|
||
7 years ago
|
public synchronized static void start() {
|
||
7 years ago
|
|
||
|
EventDispatcher.fire(EmbedServerEvent.BeforeStart);
|
||
7 years ago
|
ModuleContext.getModule(FineEmbedServerActivator.class).start();
|
||
7 years ago
|
EventDispatcher.fire(EmbedServerEvent.AfterStart);
|
||
|
}
|
||
|
|
||
7 years ago
|
public synchronized static void stop() {
|
||
7 years ago
|
|
||
|
EventDispatcher.fire(EmbedServerEvent.BeforeStop);
|
||
7 years ago
|
ModuleContext.getModule(FineEmbedServerActivator.class).stop();
|
||
7 years ago
|
EventDispatcher.fire(EmbedServerEvent.AfterStop);
|
||
|
}
|
||
|
|
||
7 years ago
|
public static boolean isRunning() {
|
||
7 years ago
|
|
||
7 years ago
|
return ModuleContext.getModule(FineEmbedServerActivator.class).isRunning();
|
||
7 years ago
|
}
|
||
|
}
|