Class SetAttributeHandler

  • All Implemented Interfaces:
    HttpHandler

    public class SetAttributeHandler
    extends java.lang.Object
    implements HttpHandler
    Handler that can set an arbitrary attribute on the exchange. Both the attribute and the value to set are expressed as exchange attributes.
    Author:
    Stuart Douglas
    • Constructor Detail

      • SetAttributeHandler

        public SetAttributeHandler​(HttpHandler next,
                                   java.lang.String attribute,
                                   java.lang.String value)
      • SetAttributeHandler

        public SetAttributeHandler​(HttpHandler next,
                                   java.lang.String attribute,
                                   java.lang.String value,
                                   java.lang.ClassLoader classLoader)
      • SetAttributeHandler

        public SetAttributeHandler​(HttpHandler next,
                                   java.lang.String attribute,
                                   java.lang.String value,
                                   boolean preCommit)
      • SetAttributeHandler

        public SetAttributeHandler​(HttpHandler next,
                                   java.lang.String attribute,
                                   java.lang.String value,
                                   java.lang.ClassLoader classLoader,
                                   boolean preCommit)
    • Method Detail

      • handleRequest

        public void handleRequest​(HttpServerExchange exchange)
                           throws java.lang.Exception
        Description copied from interface: HttpHandler
        Handle the request.
        Specified by:
        handleRequest in interface HttpHandler
        Parameters:
        exchange - the HTTP request/response exchange
        Throws:
        java.lang.Exception