@Override protected MessageHandler createExpressionEvaluatingHandler(Expression expression) { return configureSplitter(new ExpressionEvaluatingSplitter(expression)); }
/** * Populate the {@link ExpressionEvaluatingSplitter} with provided * SpEL expression. * @param expression the splitter SpEL expression. * @param endpointConfigurer the {@link Consumer} to provide integration endpoint options * and for {@link ExpressionEvaluatingSplitter}. * @return the current {@link IntegrationFlowDefinition}. * @see SplitterEndpointSpec */ public B split(String expression, Consumer<SplitterEndpointSpec<ExpressionEvaluatingSplitter>> endpointConfigurer) { Assert.hasText(expression, "'expression' must not be empty"); return split(new ExpressionEvaluatingSplitter(PARSER.parseExpression(expression)), endpointConfigurer); }
@Override protected MessageHandler createExpressionEvaluatingHandler(Expression expression) { return configureSplitter(new ExpressionEvaluatingSplitter(expression)); }
/** * Populate the {@link ExpressionEvaluatingSplitter} with provided * SpEL expression. * @param expression the splitter SpEL expression. * @param endpointConfigurer the {@link Consumer} to provide integration endpoint options * and for {@link ExpressionEvaluatingSplitter}. * @return the current {@link IntegrationFlowDefinition}. * @see SplitterEndpointSpec */ public B split(String expression, Consumer<SplitterEndpointSpec<ExpressionEvaluatingSplitter>> endpointConfigurer) { Assert.hasText(expression, "'expression' must not be empty"); return split(new ExpressionEvaluatingSplitter(PARSER.parseExpression(expression)), endpointConfigurer); }
/** * Populate the {@link ExpressionEvaluatingSplitter} with provided * SpEL expression. * @param expression the splitter SpEL expression. * @param endpointConfigurer the {@link Consumer} to provide integration endpoint options * and for {@link ExpressionEvaluatingSplitter}. * @return the current {@link IntegrationFlowDefinition}. * @see SplitterEndpointSpec */ public B split(String expression, Consumer<SplitterEndpointSpec<ExpressionEvaluatingSplitter>> endpointConfigurer) { Assert.hasText(expression, "'expression' must not be empty"); return split(new ExpressionEvaluatingSplitter(PARSER.parseExpression(expression)), endpointConfigurer); }
/** * Populate the {@link ExpressionEvaluatingSplitter} with provided * SpEL expression. * @param expression the splitter SpEL expression. * @param endpointConfigurer the {@link Consumer} to provide integration endpoint options * and for {@link ExpressionEvaluatingSplitter}. * @return the current {@link IntegrationFlowDefinition}. * @see SplitterEndpointSpec */ public B split(String expression, Consumer<SplitterEndpointSpec<ExpressionEvaluatingSplitter>> endpointConfigurer) { Assert.hasText(expression, "'expression' must not be empty"); return split(new ExpressionEvaluatingSplitter(PARSER.parseExpression(expression)), endpointConfigurer); }
@Override protected AbstractMessageSplitter createHandler() { AbstractMessageSplitter splitterHandler; Expression expression = properties.getExpression(); if (expression != null) { splitterHandler = new ExpressionEvaluatingSplitter(expression); } else { String charset = properties.getCharset(); Boolean markers = properties.getFileMarkers(); if(markers != null || charset != null) { if (markers == null) { markers = false; } FileSplitter splitter = new FileSplitter(true, markers, properties.getMarkersJson()); if (charset != null) { splitter.setCharset(Charset.forName(charset)); } splitterHandler = splitter; } else { DefaultMessageSplitter splitter = new DefaultMessageSplitter(); splitter.setDelimiters(properties.getDelimiters()); splitterHandler = splitter; } } splitterHandler.setOutputChannel(channels.output()); splitterHandler.setApplySequence(properties.isApplySequence()); return splitterHandler; }