All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.nepxion.discovery.plugin.framework.adapter.EurekaAdapter Maven / Gradle / Ivy

There is a newer version: 6.2.0
Show newest version
package com.nepxion.discovery.plugin.framework.adapter;

/**
 * 

Title: Nepxion Discovery

*

Description: Nepxion Discovery

*

Copyright: Copyright (c) 2017-2050

*

Company: Nepxion

* @author Haojun Ren * @version 1.0 */ import java.util.Map; import com.nepxion.discovery.common.exception.DiscoveryException; import com.netflix.loadbalancer.Server; import com.netflix.niws.loadbalancer.DiscoveryEnabledServer; public class EurekaAdapter extends AbstractPluginAdapter { @Override public Map getServerMetadata(Server server) { if (server instanceof DiscoveryEnabledServer) { DiscoveryEnabledServer discoveryEnabledServer = (DiscoveryEnabledServer) server; return discoveryEnabledServer.getInstanceInfo().getMetadata(); } throw new DiscoveryException("Server instance isn't the type of DiscoveryEnabledServer"); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy