gpt4 book ai didi

com.netflix.zuul.message.ZuulMessage.getContext()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-18 20:21:31 26 4
gpt4 key购买 nike

本文整理了Java中com.netflix.zuul.message.ZuulMessage.getContext()方法的一些代码示例,展示了ZuulMessage.getContext()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZuulMessage.getContext()方法的具体详情如下:
包路径:com.netflix.zuul.message.ZuulMessage
类名称:ZuulMessage
方法名:getContext

ZuulMessage.getContext介绍

暂无

代码示例

代码示例来源:origin: Netflix/zuul

@Override
public SessionContext getContext()
{
  return message.getContext();
}

代码示例来源:origin: Netflix/zuul

@Override
public SessionContext getContext()
{
  return message.getContext();
}

代码示例来源:origin: Netflix/zuul

@Override
public String getPath() {
  if (message.getContext().containsKey(CommonContextKeys.ZUUL_USE_DECODED_URI)) {
    return decodedPath;
  }
  return path;
}
@Override

代码示例来源:origin: Netflix/zuul

@Override
public SessionContext getContext()
{
  return message.getContext();
}

代码示例来源:origin: Netflix/zuul

@Override
public SessionContext getContext()
{
  return message.getContext();
}

代码示例来源:origin: Netflix/zuul

protected final AtomicInteger initRunningFilterIndex(I zuulMesg) {
  final AtomicInteger idx = new AtomicInteger(0);
  zuulMesg.getContext().put(RUNNING_FILTER_IDX_SESSION_CTX_KEY, idx);
  return idx;
}

代码示例来源:origin: Netflix/zuul

protected final void setFilterAwaitingBody(I zuulMesg, boolean flag) {
  if (flag) {
    zuulMesg.getContext().put(AWAITING_BODY_FLAG_SESSION_CTX_KEY, Boolean.TRUE);
  }
  else {
    zuulMesg.getContext().remove(AWAITING_BODY_FLAG_SESSION_CTX_KEY);
  }
}

代码示例来源:origin: Netflix/zuul

@Override
public T apply(T input) {
  CurrentPassport.fromSessionContext(input.getContext()).add(stamp);
  return input;
}

代码示例来源:origin: Netflix/zuul

protected O handleFilterException(final I inMesg, final ZuulFilter<I, O> filter, final Throwable ex) {
  inMesg.getContext().setError(ex);
  if (filter.filterType() == ENDPOINT) {
    inMesg.getContext().setShouldSendErrorResponse(true);
  }
  recordFilterError(inMesg, filter, ex);
  return filter.getDefaultOutput(inMesg);
}

代码示例来源:origin: Netflix/zuul

@Override
public String getPath() {
  if (message.getContext().containsKey(CommonContextKeys.ZUUL_USE_DECODED_URI)) {
    return decodedPath;
  }
  return path;
}
@Override

代码示例来源:origin: Netflix/zuul

protected final void setFilterAwaitingBody(I zuulMesg, boolean flag) {
  if (flag) {
    zuulMesg.getContext().put(AWAITING_BODY_FLAG_SESSION_CTX_KEY, Boolean.TRUE);
  }
  else {
    zuulMesg.getContext().remove(AWAITING_BODY_FLAG_SESSION_CTX_KEY);
  }
}

代码示例来源:origin: Netflix/zuul

protected final AtomicInteger initRunningFilterIndex(I zuulMesg) {
  final AtomicInteger idx = new AtomicInteger(0);
  zuulMesg.getContext().put(RUNNING_FILTER_IDX_SESSION_CTX_KEY, idx);
  return idx;
}

代码示例来源:origin: Netflix/zuul

@Override
public T apply(T input) {
  CurrentPassport.fromSessionContext(input.getContext()).add(stamp);
  return input;
}

代码示例来源:origin: Netflix/zuul

protected O handleFilterException(final I inMesg, final ZuulFilter<I, O> filter, final Throwable ex) {
  inMesg.getContext().setError(ex);
  if (filter.filterType() == ENDPOINT) {
    inMesg.getContext().setShouldSendErrorResponse(true);
  }
  recordFilterError(inMesg, filter, ex);
  return filter.getDefaultOutput(inMesg);
}

代码示例来源:origin: Netflix/zuul

protected HttpRequestInfo copyRequestInfo()
{
  // Unlike clone(), we create immutable copies of the Headers and HttpQueryParams here.
  HttpRequestMessageImpl req = new HttpRequestMessageImpl(message.getContext(),
      protocol, method, path,
      queryParams.immutableCopy(), message.getHeaders().immutableCopy(), clientIp, scheme,
      port, serverName, true);
  req.setHasBody(hasBody());
  return req;
}

代码示例来源:origin: Netflix/zuul

@Override
public HttpContent processContentChunk(ZuulMessage resp, HttpContent chunk) {
  final Gzipper gzipper = (Gzipper) resp.getContext().get(CommonContextKeys.GZIPPER);
  gzipper.write(chunk);
  if (chunk instanceof LastHttpContent) {
    gzipper.finish();
    return new DefaultLastHttpContent(gzipper.getByteBuf());
  } else {
    return new DefaultHttpContent(gzipper.getByteBuf());
  }
}

代码示例来源:origin: Netflix/zuul

@Override
public ZuulMessage clone()
{
  HttpRequestMessageImpl clone = new HttpRequestMessageImpl(message.getContext().clone(),
      protocol, method, path,
      queryParams.clone(), message.getHeaders().clone(), clientIp, scheme,
      port, serverName);
  if (getInboundRequest() != null) {
    clone.inboundRequest = (HttpRequestInfo) getInboundRequest().clone();
  }
  return clone;
}

代码示例来源:origin: Netflix/zuul

protected HttpRequestInfo copyRequestInfo()
{
  // Unlike clone(), we create immutable copies of the Headers and HttpQueryParams here.
  HttpRequestMessageImpl req = new HttpRequestMessageImpl(message.getContext(),
      protocol, method, path,
      queryParams.immutableCopy(), message.getHeaders().immutableCopy(), clientIp, scheme,
      port, serverName, true);
  req.setHasBody(hasBody());
  return req;
}

代码示例来源:origin: Netflix/zuul

@Override
public HttpContent processContentChunk(ZuulMessage resp, HttpContent chunk) {
  final Gzipper gzipper = (Gzipper) resp.getContext().get(CommonContextKeys.GZIPPER);
  gzipper.write(chunk);
  if (chunk instanceof LastHttpContent) {
    gzipper.finish();
    return new DefaultLastHttpContent(gzipper.getByteBuf());
  } else {
    return new DefaultHttpContent(gzipper.getByteBuf());
  }
}

代码示例来源:origin: Netflix/zuul

@Override
public ZuulMessage clone()
{
  HttpRequestMessageImpl clone = new HttpRequestMessageImpl(message.getContext().clone(),
      protocol, method, path,
      queryParams.clone(), message.getHeaders().clone(), clientIp, scheme,
      port, serverName);
  if (getInboundRequest() != null) {
    clone.inboundRequest = (HttpRequestInfo) getInboundRequest().clone();
  }
  return clone;
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com