Package io.undertow.server.handlers
Class SetAttributeHandler
- java.lang.Object
-
- io.undertow.server.handlers.SetAttributeHandler
-
- All Implemented Interfaces:
HttpHandler
public class SetAttributeHandler extends 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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SetAttributeHandler.Builder
static class
SetAttributeHandler.ClearBuilder
-
Constructor Summary
Constructors Constructor Description SetAttributeHandler(HttpHandler next, ExchangeAttribute attribute, ExchangeAttribute value)
SetAttributeHandler(HttpHandler next, ExchangeAttribute attribute, ExchangeAttribute value, boolean preCommit)
SetAttributeHandler(HttpHandler next, String attribute, String value)
SetAttributeHandler(HttpHandler next, String attribute, String value, boolean preCommit)
SetAttributeHandler(HttpHandler next, String attribute, String value, ClassLoader classLoader)
SetAttributeHandler(HttpHandler next, String attribute, String value, ClassLoader classLoader, boolean preCommit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExchangeAttribute
getValue()
void
handleRequest(HttpServerExchange exchange)
Handle the request.String
toString()
-
-
-
Constructor Detail
-
SetAttributeHandler
public SetAttributeHandler(HttpHandler next, ExchangeAttribute attribute, ExchangeAttribute value)
-
SetAttributeHandler
public SetAttributeHandler(HttpHandler next, String attribute, String value)
-
SetAttributeHandler
public SetAttributeHandler(HttpHandler next, String attribute, String value, ClassLoader classLoader)
-
SetAttributeHandler
public SetAttributeHandler(HttpHandler next, ExchangeAttribute attribute, ExchangeAttribute value, boolean preCommit)
-
SetAttributeHandler
public SetAttributeHandler(HttpHandler next, String attribute, String value, boolean preCommit)
-
SetAttributeHandler
public SetAttributeHandler(HttpHandler next, String attribute, String value, ClassLoader classLoader, boolean preCommit)
-
-
Method Detail
-
getValue
public ExchangeAttribute getValue()
-
handleRequest
public void handleRequest(HttpServerExchange exchange) throws Exception
Description copied from interface:HttpHandler
Handle the request.- Specified by:
handleRequest
in interfaceHttpHandler
- Parameters:
exchange
- the HTTP request/response exchange- Throws:
Exception
-
-