Commit 41b048f1 by huangfusuper

Plugin插件服务端基类代码编写与修改

parent 036a966d
package com.byit.server;
import com.byit.factory.PluginServerFactory;
import com.byit.param.PluginCallback;
/**
......@@ -27,6 +28,15 @@ public abstract class PluginServer {
this.stopPluginCallback = stopPluginCallback;
}
/**
* 启动方法 该方法用于启动对应的服务器 必须回调onStart方法
* @param pluginServerFactory 插件服务工厂
*/
public abstract void start(PluginServerFactory pluginServerFactory);
/**
* 回调插件的启动方法
*/
public void onStart(){
if(startPluginCallback != null){
try {
......@@ -36,6 +46,15 @@ public abstract class PluginServer {
}
}
}
/**
* 服务的停止方法 必须回调onStop方法
*/
public abstract void stop();
/**
* 回调插件的停止方法
*/
public void onStop(){
if(stopPluginCallback != null){
if(stopPluginCallback != null){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment