/** * Returns an attribute setting handler that can be used to set an arbitrary attribute on the exchange. * This includes functions such as adding and removing headers etc. * * @param next The next handler * @param attribute The attribute to set, specified as a string presentation of an {@link io.undertow.attribute.ExchangeAttribute} * @param value The value to set, specified an a string representation of an {@link io.undertow.attribute.ExchangeAttribute} * @param classLoader The class loader to use to parser the exchange attributes * @return The handler */ public static SetAttributeHandler setAttribute(final HttpHandler next, final String attribute, final String value, final ClassLoader classLoader) { return new SetAttributeHandler(next, attribute, value, classLoader); }
@Override public HttpHandler wrap(HttpHandler handler) { return new SetAttributeHandler(handler, attribute, value, preCommit == null ? false : preCommit); } };
@Override public HttpHandler wrap(HttpHandler handler) { return new SetAttributeHandler(handler, attribute, NullAttribute.INSTANCE, preCommit == null ? false : preCommit); } };
@Override public HttpHandler wrap(HttpHandler handler) { return new SetAttributeHandler(handler, ExchangeAttributes.relativePath(), value); } };
public HttpHandler create(HttpHandler next, String expression, boolean redirect) { if(redirect) { return new RedirectHandler(expression); } else { return new SetAttributeHandler(next, ExchangeAttributes.relativePath(), ExchangeAttributes.parser(getClass().getClassLoader()).parse(expression)); } }
@Override public HttpHandler wrap(HttpHandler handler) { return new SetAttributeHandler(handler, attribute, value, preCommit == null ? false : preCommit); } };
@Override public HttpHandler wrap(HttpHandler handler) { return new SetAttributeHandler(handler, attribute, NullAttribute.INSTANCE, preCommit == null ? false : preCommit); } };
@Override public HttpHandler wrap(HttpHandler handler) { return new SetAttributeHandler(handler, attribute, value, preCommit == null ? false : preCommit); } };
/** * Returns an attribute setting handler that can be used to set an arbitrary attribute on the exchange. * This includes functions such as adding and removing headers etc. * * @param next The next handler * @param attribute The attribute to set, specified as a string presentation of an {@link io.undertow.attribute.ExchangeAttribute} * @param value The value to set, specified an a string representation of an {@link io.undertow.attribute.ExchangeAttribute} * @param classLoader The class loader to use to parser the exchange attributes * @return The handler */ public static SetAttributeHandler setAttribute(final HttpHandler next, final String attribute, final String value, final ClassLoader classLoader) { return new SetAttributeHandler(next, attribute, value, classLoader); }
@Override public HttpHandler wrap(HttpHandler handler) { return new SetAttributeHandler(handler, attribute, NullAttribute.INSTANCE, preCommit == null ? false : preCommit); } };
/** * Returns an attribute setting handler that can be used to set an arbitrary attribute on the exchange. * This includes functions such as adding and removing headers etc. * * @param next The next handler * @param attribute The attribute to set, specified as a string presentation of an {@link io.undertow.attribute.ExchangeAttribute} * @param value The value to set, specified an a string representation of an {@link io.undertow.attribute.ExchangeAttribute} * @param classLoader The class loader to use to parser the exchange attributes * @return The handler */ public static SetAttributeHandler setAttribute(final HttpHandler next, final String attribute, final String value, final ClassLoader classLoader) { return new SetAttributeHandler(next, attribute, value, classLoader); }
@Override public HttpHandler wrap(HttpHandler handler) { return new SetAttributeHandler(handler, ExchangeAttributes.relativePath(), value); } };
@Override public HttpHandler wrap(HttpHandler handler) { return new SetAttributeHandler(handler, ExchangeAttributes.relativePath(), value); } };
public HttpHandler create(HttpHandler next, String expression, boolean redirect) { if(redirect) { return new RedirectHandler(expression); } else { return new SetAttributeHandler(next, ExchangeAttributes.relativePath(), ExchangeAttributes.parser(getClass().getClassLoader()).parse(expression)); } }
public HttpHandler create(HttpHandler next, String expression, boolean redirect) { if(redirect) { return new RedirectHandler(expression); } else { return new SetAttributeHandler(next, ExchangeAttributes.relativePath(), ExchangeAttributes.parser(getClass().getClassLoader()).parse(expression)); } }