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

com.nepxion.discovery.plugin.strategy.gateway.adapter.DefaultDiscoveryEnabledAdapter Maven / Gradle / Ivy

package com.nepxion.discovery.plugin.strategy.gateway.adapter;

/**
 * 

Title: Nepxion Discovery

*

Description: Nepxion Discovery

*

Copyright: Copyright (c) 2017-2050

*

Company: Nepxion

* @author Haojun Ren * @version 1.0 */ import com.nepxion.discovery.common.constant.DiscoveryConstant; import com.nepxion.discovery.plugin.strategy.adapter.AbstractDiscoveryEnabledAdapter; import com.nepxion.discovery.plugin.strategy.gateway.context.GatewayStrategyContext; public class DefaultDiscoveryEnabledAdapter extends AbstractDiscoveryEnabledAdapter { @Override protected String getVersionValue() { GatewayStrategyContext context = GatewayStrategyContext.getCurrentContext(); return context.getExchange().getRequest().getHeaders().getFirst(DiscoveryConstant.VERSION); } @Override protected String getRegionValue() { GatewayStrategyContext context = GatewayStrategyContext.getCurrentContext(); return context.getExchange().getRequest().getHeaders().getFirst(DiscoveryConstant.REGION); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy