Package top.wcpe.beacon.agent.api
Class BeaconAgentProvider
java.lang.Object
top.wcpe.beacon.agent.api.BeaconAgentProvider
Beacon agent 对外门面的获取入口。
业务插件通过 get() 拿到 BeaconAgent,进而读「有效配置」与查「服务发现」。
实现由 agent-bukkit / agent-bungee 在插件 ENABLE 阶段注入,DISABLE 阶段注销。
-
Method Summary
Modifier and TypeMethodDescriptionstatic BeaconAgentget()获取 Beacon agent 门面。static booleanagent 是否已就绪(业务插件可据此先行判断,避免触发异常)。static voidregister(BeaconAgent agent) 由 agent 实现层在 ENABLE 阶段注册;业务插件不应调用。static void由 agent 实现层在 DISABLE 阶段注销;业务插件不应调用。
-
Method Details
-
get
获取 Beacon agent 门面。- Returns:
- 已就绪的门面
- Throws:
AgentUnavailableException- agent 尚未初始化或已卸载
-
isAvailable
public static boolean isAvailable()agent 是否已就绪(业务插件可据此先行判断,避免触发异常)。 -
register
由 agent 实现层在 ENABLE 阶段注册;业务插件不应调用。 -
unregister
public static void unregister()由 agent 实现层在 DISABLE 阶段注销;业务插件不应调用。
-