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

com.nepxion.discovery.plugin.strategy.gateway.context.GatewayStrategyContextHolder Maven / Gradle / Ivy

There is a newer version: 6.22.0
Show newest version
package com.nepxion.discovery.plugin.strategy.gateway.context;

/**
 * 

Title: Nepxion Discovery

*

Description: Nepxion Discovery

*

Copyright: Copyright (c) 2017-2050

*

Company: Nepxion

* @author Haojun Ren * @version 1.0 */ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.web.server.ServerWebExchange; import com.nepxion.discovery.plugin.strategy.context.AbstractStrategyContextHolder; public class GatewayStrategyContextHolder extends AbstractStrategyContextHolder { private static final Logger LOG = LoggerFactory.getLogger(GatewayStrategyContextHolder.class); public ServerWebExchange getExchange() { return GatewayStrategyContext.getCurrentContext().getExchange(); } @Override public String getHeader(String name) { ServerWebExchange exchange = getExchange(); if (exchange == null) { LOG.warn("The ServerWebExchange object is null"); return null; } return exchange.getRequest().getHeaders().getFirst(name); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy