class ZookeeperAdapter extends AbstractPluginAdapter {
    // Zookeeper比较特殊，getServiceInstance是Lazy Initialize模式
    @PostConstruct
    public void initialize() {
        if (registration instanceof ZookeeperRegistration) {
            ZookeeperRegistration zookeeperRegistration = (ZookeeperRegistration) registration;

            zookeeperRegistration.getServiceInstance();

            return;
        }

        throw new DiscoveryException("Registration isn't the type of ZookeeperRegistration");
    }

    @Override
    public Map<String, String> getServerMetadata(Server server) {<FILL_FUNCTION_BODY>}
}

        if (server instanceof ZookeeperServer) {
            ZookeeperServer zookeeperServer = (ZookeeperServer) server;

            return zookeeperServer.getInstance().getPayload().getMetadata();
        }

        return emptyMetadata;

        // throw new DiscoveryException("Server instance isn't the type of ZookeeperServer");
    
<methods>public non-sealed void <init>() ,public void clearDynamicGlobalRule() ,public void clearDynamicPartialRule() ,public void clearDynamicVersion() ,public java.lang.String getContextPath() ,public com.nepxion.discovery.common.entity.RuleEntity getDynamicGlobalRule() ,public com.nepxion.discovery.common.entity.RuleEntity getDynamicPartialRule() ,public com.nepxion.discovery.common.entity.RuleEntity getDynamicRule() ,public java.lang.String getDynamicVersion() ,public java.lang.String getEnvironment() ,public java.lang.String getFormatContextPath() ,public java.lang.String getGroup() ,public java.lang.String getGroupKey() ,public java.lang.String getHost() ,public java.lang.String getInstanceContextPath(ServiceInstance) ,public java.lang.String getInstanceEnvironment(ServiceInstance) ,public java.lang.String getInstanceFormatContextPath(ServiceInstance) ,public java.lang.String getInstanceGroup(ServiceInstance) ,public java.lang.String getInstanceGroupKey(ServiceInstance) ,public Map<java.lang.String,java.lang.String> getInstanceMetadata(ServiceInstance) ,public java.lang.String getInstancePlugin(ServiceInstance) ,public java.lang.String getInstanceProtocol(ServiceInstance) ,public java.lang.String getInstanceRegion(ServiceInstance) ,public java.lang.String getInstanceServiceAppId(ServiceInstance) ,public java.lang.String getInstanceServiceId(ServiceInstance) ,public java.lang.String getInstanceServiceType(ServiceInstance) ,public java.lang.String getInstanceServiceUUId(ServiceInstance) ,public java.lang.String getInstanceVersion(ServiceInstance) ,public java.lang.String getInstanceZone(ServiceInstance) ,public com.nepxion.discovery.common.entity.RuleEntity getLocalRule() ,public java.lang.String getLocalVersion() ,public Map<java.lang.String,java.lang.String> getMetadata() ,public java.lang.String getPlugin() ,public java.lang.String getPluginInfo(java.lang.String) ,public int getPort() ,public java.lang.String getProtocol() ,public java.lang.String getRegion() ,public com.nepxion.discovery.common.entity.RuleEntity getRule() ,public java.lang.String getServerContextPath(Server) ,public java.lang.String getServerEnvironment(Server) ,public java.lang.String getServerFormatContextPath(Server) ,public java.lang.String getServerGroup(Server) ,public java.lang.String getServerGroupKey(Server) ,public java.lang.String getServerPlugin(Server) ,public java.lang.String getServerProtocol(Server) ,public java.lang.String getServerRegion(Server) ,public java.lang.String getServerServiceAppId(Server) ,public java.lang.String getServerServiceId(Server) ,public java.lang.String getServerServiceType(Server) ,public java.lang.String getServerServiceUUId(Server) ,public java.lang.String getServerVersion(Server) ,public java.lang.String getServerZone(Server) ,public java.lang.String getServiceAppId() ,public java.lang.String getServiceId() ,public java.lang.String getServiceType() ,public java.lang.String getServiceUUId() ,public java.lang.String getVersion() ,public java.lang.String getZone() ,public boolean isActive() ,public boolean isInstanceActive(ServiceInstance) ,public boolean isServerActive(Server) ,public void setDynamicGlobalRule(com.nepxion.discovery.common.entity.RuleEntity) ,public void setDynamicPartialRule(com.nepxion.discovery.common.entity.RuleEntity) ,public void setDynamicVersion(java.lang.String) ,public void setLocalRule(com.nepxion.discovery.common.entity.RuleEntity) <variables>private java.lang.String applicationType,protected Map<java.lang.String,java.lang.String> emptyMetadata,private java.lang.String groupKey,protected com.nepxion.discovery.plugin.framework.cache.PluginCache pluginCache,protected com.nepxion.discovery.plugin.framework.context.PluginContextHolder pluginContextHolder,protected Registration registration,protected com.nepxion.discovery.plugin.framework.cache.RuleCache ruleCache