/** * Add header specifications; the {@link Map} values must be String representations of * SpEL expressions that will be evaluated at run time when the message headers are * enriched. * @param headers the headers. * @param overwrite true to overwrite existing headers. * @return the header enricher spec. */ public HeaderEnricherSpec headerExpressions(Map<String, String> headers, Boolean overwrite) { Assert.notNull(headers, "'headers' must not be null"); for (Entry<String, String> entry : headers.entrySet()) { AbstractHeaderValueMessageProcessor<Object> processor = new ExpressionEvaluatingHeaderValueMessageProcessor<>(entry.getValue(), null); processor.setOverwrite(overwrite); header(entry.getKey(), processor); } return this; }
private EnricherSpec headerExpression(String name, Expression expression, Boolean overwrite) { AbstractHeaderValueMessageProcessor<?> headerValueMessageProcessor = new ExpressionEvaluatingHeaderValueMessageProcessor<>(expression, null); headerValueMessageProcessor.setOverwrite(overwrite); return header(name, headerValueMessageProcessor); }
private HeaderEnricherSpec headerExpression(String name, Expression expression, Boolean overwrite) { AbstractHeaderValueMessageProcessor<?> headerValueMessageProcessor = new ExpressionEvaluatingHeaderValueMessageProcessor<>(expression, null); headerValueMessageProcessor.setOverwrite(overwrite); return header(name, headerValueMessageProcessor); }
/** * @param name the header name. * @param value the value. * @param overwrite true to overwrite the header if already present. * @param <V> the value type. * @return the enricher spec. * @see ContentEnricher#setHeaderExpressions(Map) */ public <V> EnricherSpec header(String name, V value, Boolean overwrite) { AbstractHeaderValueMessageProcessor<V> headerValueMessageProcessor = new StaticHeaderValueMessageProcessor<V>(value); headerValueMessageProcessor.setOverwrite(overwrite); return header(name, headerValueMessageProcessor); }
/** * Add a single header specification. * @param name the header name. * @param value the header value (not an {@link Expression}). * @param overwrite true to overwrite an existing header. * @param <V> the value type. * @return the header enricher spec. */ public <V> HeaderEnricherSpec header(String name, V value, Boolean overwrite) { AbstractHeaderValueMessageProcessor<V> headerValueMessageProcessor = new StaticHeaderValueMessageProcessor<>(value); headerValueMessageProcessor.setOverwrite(overwrite); return header(name, headerValueMessageProcessor); }
/** * Add header specifications from the {@link Map}; if a map value is an * {@link Expression}, it will be evaluated at run time when the message headers are * enriched. Otherwise the value is simply added to the headers. * @param headers The header builder. * @param overwrite true to overwrite existing headers. * @return the header enricher spec. */ public HeaderEnricherSpec headers(Map<String, Object> headers, Boolean overwrite) { Assert.notNull(headers, "'headers' must not be null"); for (Entry<String, Object> entry : headers.entrySet()) { String name = entry.getKey(); Object value = entry.getValue(); if (value instanceof Expression) { AbstractHeaderValueMessageProcessor<Object> processor = new ExpressionEvaluatingHeaderValueMessageProcessor<>((Expression) value, null); processor.setOverwrite(overwrite); header(name, processor); } else { header(name, value, overwrite); } } return this; }
/** * Add header specifications; the {@link Map} values must be String representations of * SpEL expressions that will be evaluated at run time when the message headers are * enriched. * @param headers the headers. * @param overwrite true to overwrite existing headers. * @return the header enricher spec. */ public HeaderEnricherSpec headerExpressions(Map<String, String> headers, Boolean overwrite) { Assert.notNull(headers, "'headers' must not be null"); for (Entry<String, String> entry : headers.entrySet()) { AbstractHeaderValueMessageProcessor<Object> processor = new ExpressionEvaluatingHeaderValueMessageProcessor<>(entry.getValue(), null); processor.setOverwrite(overwrite); header(entry.getKey(), processor); } return this; }
/** * Add header specifications; the {@link Map} values must be String representations of * SpEL expressions that will be evaluated at run time when the message headers are * enriched. * @param headers the headers. * @param overwrite true to overwrite existing headers. * @return the header enricher spec. */ public HeaderEnricherSpec headerExpressions(Map<String, String> headers, Boolean overwrite) { Assert.notNull(headers, "'configurer' must not be null"); for (Entry<String, String> entry : headers.entrySet()) { AbstractHeaderValueMessageProcessor<Object> processor = new ExpressionEvaluatingHeaderValueMessageProcessor<Object>(entry.getValue(), null); processor.setOverwrite(overwrite); header(entry.getKey(), processor); } return this; }
private EnricherSpec headerExpression(String name, Expression expression, Boolean overwrite) { AbstractHeaderValueMessageProcessor<?> headerValueMessageProcessor = new ExpressionEvaluatingHeaderValueMessageProcessor<Object>(expression, null); headerValueMessageProcessor.setOverwrite(overwrite); return header(name, headerValueMessageProcessor); }
private EnricherSpec headerExpression(String name, Expression expression, Boolean overwrite) { AbstractHeaderValueMessageProcessor<?> headerValueMessageProcessor = new ExpressionEvaluatingHeaderValueMessageProcessor<>(expression, null); headerValueMessageProcessor.setOverwrite(overwrite); return header(name, headerValueMessageProcessor); }
/** * Add a single header specification. * @param name the header name. * @param value the header value (not an {@link Expression}). * @param overwrite true to overwrite an existing header. * @param <V> the value type. * @return the header enricher spec. */ public <V> HeaderEnricherSpec header(String name, V value, Boolean overwrite) { AbstractHeaderValueMessageProcessor<V> headerValueMessageProcessor = new StaticHeaderValueMessageProcessor<>(value); headerValueMessageProcessor.setOverwrite(overwrite); return header(name, headerValueMessageProcessor); }
private EnricherSpec headerExpression(String name, Expression expression, Boolean overwrite) { AbstractHeaderValueMessageProcessor<?> headerValueMessageProcessor = new ExpressionEvaluatingHeaderValueMessageProcessor<Object>(expression, null); headerValueMessageProcessor.setOverwrite(overwrite); return header(name, headerValueMessageProcessor); }
private HeaderEnricherSpec headerExpression(String name, Expression expression, Boolean overwrite) { AbstractHeaderValueMessageProcessor<?> headerValueMessageProcessor = new ExpressionEvaluatingHeaderValueMessageProcessor<>(expression, null); headerValueMessageProcessor.setOverwrite(overwrite); return header(name, headerValueMessageProcessor); }
private HeaderEnricherSpec headerExpression(String name, Expression expression, Boolean overwrite) { AbstractHeaderValueMessageProcessor<?> headerValueMessageProcessor = new ExpressionEvaluatingHeaderValueMessageProcessor<Object>(expression, null); headerValueMessageProcessor.setOverwrite(overwrite); return header(name, headerValueMessageProcessor); }
private HeaderEnricherSpec headerExpression(String name, Expression expression, Boolean overwrite) { AbstractHeaderValueMessageProcessor<?> headerValueMessageProcessor = new ExpressionEvaluatingHeaderValueMessageProcessor<Object>(expression, null); headerValueMessageProcessor.setOverwrite(overwrite); return header(name, headerValueMessageProcessor); }
/** * Add a single header specification. * @param name the header name. * @param value the header value (not an {@link Expression}). * @param overwrite true to overwrite an existing header. * @param <V> the value type. * @return the header enricher spec. */ public <V> HeaderEnricherSpec header(String name, V value, Boolean overwrite) { AbstractHeaderValueMessageProcessor<V> headerValueMessageProcessor = new StaticHeaderValueMessageProcessor<V>(value); headerValueMessageProcessor.setOverwrite(overwrite); return header(name, headerValueMessageProcessor); }
/** * @param name the header name. * @param value the value. * @param overwrite true to overwrite the header if already present. * @param <V> the value type. * @return the enricher spec. * @see ContentEnricher#setHeaderExpressions(Map) */ public <V> EnricherSpec header(String name, V value, Boolean overwrite) { AbstractHeaderValueMessageProcessor<V> headerValueMessageProcessor = new StaticHeaderValueMessageProcessor<V>(value); headerValueMessageProcessor.setOverwrite(overwrite); return header(name, headerValueMessageProcessor); }
/** * Add a single header specification. * @param name the header name. * @param value the header value (not an {@link Expression}). * @param overwrite true to overwrite an existing header. * @param <V> the value type. * @return the header enricher spec. */ public <V> HeaderEnricherSpec header(String name, V value, Boolean overwrite) { AbstractHeaderValueMessageProcessor<V> headerValueMessageProcessor = new StaticHeaderValueMessageProcessor<V>(value); headerValueMessageProcessor.setOverwrite(overwrite); return header(name, headerValueMessageProcessor); }
/** * @param name the header name. * @param value the value. * @param overwrite true to overwrite the header if already present. * @param <V> the value type. * @return the enricher spec. * @see ContentEnricher#setHeaderExpressions(Map) */ public <V> EnricherSpec header(String name, V value, Boolean overwrite) { AbstractHeaderValueMessageProcessor<V> headerValueMessageProcessor = new StaticHeaderValueMessageProcessor<V>(value); headerValueMessageProcessor.setOverwrite(overwrite); return header(name, headerValueMessageProcessor); }
/** * @param name the header name. * @param value the value. * @param overwrite true to overwrite the header if already present. * @param <V> the value type. * @return the enricher spec. * @see ContentEnricher#setHeaderExpressions(Map) */ public <V> EnricherSpec header(String name, V value, Boolean overwrite) { AbstractHeaderValueMessageProcessor<V> headerValueMessageProcessor = new StaticHeaderValueMessageProcessor<V>(value); headerValueMessageProcessor.setOverwrite(overwrite); return header(name, headerValueMessageProcessor); }