public class RibbonRoutingFilter
extends com.netflix.zuul.ZuulFilter
ZuulFilter
that uses Ribbon, Hystrix and pluggable http clients to send requests.
ServiceIds are found in the RequestContext
attribute FilterConstants.SERVICE_ID_KEY
.Modifier and Type | Field and Description |
---|---|
protected ProxyRequestHelper |
helper |
protected List<RibbonRequestCustomizer> |
requestCustomizers |
protected RibbonCommandFactory<?> |
ribbonCommandFactory |
Constructor and Description |
---|
RibbonRoutingFilter(ProxyRequestHelper helper,
RibbonCommandFactory<?> ribbonCommandFactory,
List<RibbonRequestCustomizer> requestCustomizers) |
RibbonRoutingFilter(RibbonCommandFactory<?> ribbonCommandFactory) |
Modifier and Type | Method and Description |
---|---|
protected RibbonCommandContext |
buildCommandContext(com.netflix.zuul.context.RequestContext context) |
int |
filterOrder() |
String |
filterType() |
protected com.netflix.client.ClientException |
findClientException(Throwable t) |
protected org.springframework.http.client.ClientHttpResponse |
forward(RibbonCommandContext context) |
protected InputStream |
getRequestBody(javax.servlet.http.HttpServletRequest request) |
protected String |
getVerb(javax.servlet.http.HttpServletRequest request) |
protected org.springframework.http.client.ClientHttpResponse |
handleException(Map<String,Object> info,
com.netflix.hystrix.exception.HystrixRuntimeException ex) |
Object |
run() |
protected void |
setResponse(org.springframework.http.client.ClientHttpResponse resp) |
boolean |
shouldFilter() |
protected ProxyRequestHelper helper
protected RibbonCommandFactory<?> ribbonCommandFactory
protected List<RibbonRequestCustomizer> requestCustomizers
public RibbonRoutingFilter(ProxyRequestHelper helper, RibbonCommandFactory<?> ribbonCommandFactory, List<RibbonRequestCustomizer> requestCustomizers)
public RibbonRoutingFilter(RibbonCommandFactory<?> ribbonCommandFactory)
public String filterType()
filterType
in class com.netflix.zuul.ZuulFilter
public int filterOrder()
filterOrder
in class com.netflix.zuul.ZuulFilter
public boolean shouldFilter()
public Object run()
protected RibbonCommandContext buildCommandContext(com.netflix.zuul.context.RequestContext context)
protected org.springframework.http.client.ClientHttpResponse forward(RibbonCommandContext context) throws Exception
Exception
protected org.springframework.http.client.ClientHttpResponse handleException(Map<String,Object> info, com.netflix.hystrix.exception.HystrixRuntimeException ex) throws com.netflix.zuul.exception.ZuulException
com.netflix.zuul.exception.ZuulException
protected com.netflix.client.ClientException findClientException(Throwable t)
protected InputStream getRequestBody(javax.servlet.http.HttpServletRequest request)
protected String getVerb(javax.servlet.http.HttpServletRequest request)
protected void setResponse(org.springframework.http.client.ClientHttpResponse resp) throws com.netflix.client.ClientException, IOException
com.netflix.client.ClientException
IOException
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.