【仅供内部供应商使用,不提供对外解答和培训】
...
当插件依赖的类型为资源文件或者服务文件是,用户在更新插件或者下载插件时,会默认将依
赖同插件一起下载。
5、插件依赖配置说明:
添加依赖的方法是在插件配置文件的dependence属性中添加依赖节点DependenceUnit 添加依赖的方法是在插件配置文件的dependence属性中添加依赖节点Item,节点的
属性为依赖的标志号dependenceID、依赖的类型dependenceType、依赖的安装地址dependenceDir,
属性为依赖的标志号key、依赖的类型type、依赖的安装地址location,
如果插件的类型为service时,可设置启动服务的处理类class如果插件的类型为service时,可设置启动服务的处理类class,
6、插件配置示例:
| Code Block | ||
|---|---|---|
| ||
<dependence>
<DependenceUnit dependenceID<Item key="plugin.geojson" dependenceTypetype="file" dependenceDirlocation="/resources/geojson"/>
<DependenceUnit dependenceID<Item key="plugin.phantomjs" dependenceTypetype="service" dependenceDirlocation="/resources/phantomjs" class="com.fr.plugin.chart.export.pool.ServerObjectFactoryInterface"/>
</dependence> |
...
| Code Block | ||||
|---|---|---|---|---|
| ||||
public interface PluginServiceCreator{
public void startService();
public void destroyService();
public String localServiceAction(String req) throws Exception;
public String remoteServiceAction(String req) throws Exception;
public String fetchServiceData(String req);
} |
c:使用方法
具体服务时,只需要继承已经写好的抽象类PluginService,实现其中的本地方法,已经返回一个自定义具体服务时,只需要继承已经写好的抽象类PluginService,实现其中的本地方法,以及返回一个自定义
服务的ID,即可支持本地和远程服务。具体服务类实现方法如下:
...