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.
31 lines
752 B
31 lines
752 B
5 years ago
|
package com.fr.exit;
|
||
|
|
||
|
import com.fr.process.engine.core.FineProcessContext;
|
||
|
import com.fr.process.engine.core.FineProcessEngineEvent;
|
||
|
import com.fr.stable.StableUtils;
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @author hades
|
||
|
* @version 10.0
|
||
|
* Created by hades on 2020/2/12
|
||
|
*/
|
||
|
public class DesignerExiter {
|
||
|
|
||
|
public static final DesignerExiter INSTANCE = new DesignerExiter();
|
||
|
|
||
|
private static final String DOT = ".";
|
||
|
|
||
|
public static DesignerExiter getInstance() {
|
||
|
return INSTANCE;
|
||
|
}
|
||
|
|
||
|
public void execute() {
|
||
|
if (FineProcessContext.getParentPipe() == null && DOT.equals(StableUtils.getInstallHome())) {
|
||
|
System.exit(0);
|
||
|
} else {
|
||
|
FineProcessContext.getParentPipe().fire(FineProcessEngineEvent.DESTROY);
|
||
|
}
|
||
|
}
|
||
|
}
|