Class HeaderFilter

  • All Implemented Interfaces:
    org.forgerock.http.Filter

    public class HeaderFilter
    extends Object
    implements org.forgerock.http.Filter
    Removes headers from and adds headers to a message.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  HeaderFilter.Heaplet
      Creates and initializes a header filter in a heap environment.
    • Constructor Summary

      Constructors 
      Constructor Description
      HeaderFilter​(MessageType messageType)
      Builds a HeaderFilter processing either the incoming or outgoing message.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.forgerock.util.promise.Promise<org.forgerock.http.protocol.Response,​org.forgerock.util.promise.NeverThrowsException> filter​(org.forgerock.services.context.Context context, org.forgerock.http.protocol.Request request, org.forgerock.http.Handler next)  
      org.forgerock.http.util.MultiValueMap<String,​Expression<String>> getAddedHeaders()
      Returns the header fields to add to the message, represented as a MultiMap of String to a List of String, each listed value representing an expression that will be evaluated.
      org.forgerock.http.util.CaseInsensitiveSet getRemovedHeaders()
      Returns the names of header fields to remove from the message.
    • Method Detail

      • getRemovedHeaders

        public org.forgerock.http.util.CaseInsensitiveSet getRemovedHeaders()
        Returns the names of header fields to remove from the message.
        Returns:
        the names of header fields to remove from the message.
      • getAddedHeaders

        public org.forgerock.http.util.MultiValueMap<String,​Expression<String>> getAddedHeaders()
        Returns the header fields to add to the message, represented as a MultiMap of String to a List of String, each listed value representing an expression that will be evaluated.
        Returns:
        the header fields to add to the message.
      • filter

        public org.forgerock.util.promise.Promise<org.forgerock.http.protocol.Response,​org.forgerock.util.promise.NeverThrowsException> filter​(org.forgerock.services.context.Context context,
                                                                                                                                                     org.forgerock.http.protocol.Request request,
                                                                                                                                                     org.forgerock.http.Handler next)
        Specified by:
        filter in interface org.forgerock.http.Filter