Package com.bytedesk.core.plugin
Class AbstractBytedeskPlugin
java.lang.Object
com.bytedesk.core.plugin.AbstractBytedeskPlugin
- All Implemented Interfaces:
BytedeskPlugin
- Direct Known Subclasses:
AiPlugin,CallPlugin,CorePlugin,KbasePlugin,ServicePlugin,TicketPlugin,VocPlugin
Bytedesk插件抽象基类
提供插件的通用实现
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()插件销毁protected StringformatDuration(Duration duration) 格式化时长获取插件作者 默认返回Bytedesk团队protected org.springframework.boot.actuate.health.HealthIndicator获取健康指示器 子类可以重写此方法提供自定义的HealthIndicator获取插件健康状态 默认从对应的HealthIndicator获取获取插件统计信息 包含基本信息和运行时长void插件初始化Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.bytedesk.core.plugin.BytedeskPlugin
getDependencies, getDescription, getPluginId, getPluginName, getPriority, getVersion, getWebsite, isEnabled
-
Field Details
-
registerTime
-
-
Constructor Details
-
AbstractBytedeskPlugin
public AbstractBytedeskPlugin()
-
-
Method Details
-
getAuthor
获取插件作者 默认返回Bytedesk团队- Specified by:
getAuthorin interfaceBytedeskPlugin- Returns:
- 作者信息
-
getHealthIndicator
protected org.springframework.boot.actuate.health.HealthIndicator getHealthIndicator()获取健康指示器 子类可以重写此方法提供自定义的HealthIndicator -
getHealthStatus
获取插件健康状态 默认从对应的HealthIndicator获取- Specified by:
getHealthStatusin interfaceBytedeskPlugin- Returns:
- 健康状态信息
-
getStatistics
获取插件统计信息 包含基本信息和运行时长- Specified by:
getStatisticsin interfaceBytedeskPlugin- Returns:
- 统计数据
-
formatDuration
格式化时长 -
initialize
public void initialize()插件初始化- Specified by:
initializein interfaceBytedeskPlugin
-
destroy
public void destroy()插件销毁- Specified by:
destroyin interfaceBytedeskPlugin
-