Class HttpHeadersWithAuthenticationContext

java.lang.Object
io.netty.handler.codec.http.HttpHeaders
io.netty.handler.codec.http.DefaultHttpHeaders
org.elasticsearch.http.netty4.internal.HttpHeadersWithAuthenticationContext
All Implemented Interfaces:
Iterable<Map.Entry<String,String>>

public final class HttpHeadersWithAuthenticationContext extends io.netty.handler.codec.http.DefaultHttpHeaders
HttpHeaders implementation that carries along the ThreadContext.StoredContext iff the HTTP headers have been authenticated successfully.
  • Nested Class Summary

    Nested classes/interfaces inherited from class io.netty.handler.codec.http.HttpHeaders

    io.netty.handler.codec.http.HttpHeaders.Names, io.netty.handler.codec.http.HttpHeaders.Values
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final org.apache.lucene.util.SetOnce<ThreadContext.StoredContext>
     

    Fields inherited from class io.netty.handler.codec.http.HttpHeaders

    EMPTY_HEADERS
  • Constructor Summary

    Constructors
    Constructor
    Description
    HttpHeadersWithAuthenticationContext(io.netty.handler.codec.http.HttpHeaders httpHeaders)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    io.netty.handler.codec.http.HttpHeaders
     
    void
    Must be called at most once in order to mark the http headers as successfully authenticated.

    Methods inherited from class io.netty.handler.codec.http.DefaultHttpHeaders

    add, add, add, add, add, addInt, addShort, clear, contains, contains, contains, contains, entries, equals, get, get, getAll, getAll, getInt, getInt, getShort, getShort, getTimeMillis, getTimeMillis, hashCode, isEmpty, iterator, iteratorCharSequence, names, remove, remove, set, set, set, set, set, setInt, setShort, size, unwrap, valueCharSequenceIterator, valueStringIterator

    Methods inherited from class io.netty.handler.codec.http.HttpHeaders

    addDateHeader, addDateHeader, addHeader, addHeader, addIntHeader, addIntHeader, clearHeaders, containsValue, encodeAscii, equalsIgnoreCase, get, getAllAsString, getAsString, getContentLength, getContentLength, getDate, getDate, getDateHeader, getDateHeader, getDateHeader, getDateHeader, getHeader, getHeader, getHeader, getHeader, getHost, getHost, getIntHeader, getIntHeader, getIntHeader, getIntHeader, is100ContinueExpected, isContentLengthSet, isKeepAlive, isTransferEncodingChunked, iteratorAsString, newEntity, removeHeader, removeHeader, removeTransferEncodingChunked, set100ContinueExpected, set100ContinueExpected, setAll, setContentLength, setDate, setDateHeader, setDateHeader, setDateHeader, setDateHeader, setHeader, setHeader, setHeader, setHeader, setHost, setHost, setIntHeader, setIntHeader, setIntHeader, setIntHeader, setKeepAlive, setTransferEncodingChunked, toString

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator
  • Field Details

  • Constructor Details

    • HttpHeadersWithAuthenticationContext

      public HttpHeadersWithAuthenticationContext(io.netty.handler.codec.http.HttpHeaders httpHeaders)
  • Method Details

    • setAuthenticationContext

      public void setAuthenticationContext(ThreadContext.StoredContext authenticationContext)
      Must be called at most once in order to mark the http headers as successfully authenticated. The intent of the ThreadContext.StoredContext parameter is to associate the resulting thread context post authentication, that will later be restored when dispatching the request.
    • copy

      public io.netty.handler.codec.http.HttpHeaders copy()
      Overrides:
      copy in class io.netty.handler.codec.http.DefaultHttpHeaders