Example usage for org.springframework.integration.handler ExpressionEvaluatingMessageProcessor ExpressionEvaluatingMessageProcessor

List of usage examples for org.springframework.integration.handler ExpressionEvaluatingMessageProcessor ExpressionEvaluatingMessageProcessor

Introduction

In this page you can find the example usage for org.springframework.integration.handler ExpressionEvaluatingMessageProcessor ExpressionEvaluatingMessageProcessor.

Prototype

public ExpressionEvaluatingMessageProcessor(String expression, @Nullable Class<T> expectedType) 

Source Link

Document

Construct ExpressionEvaluatingMessageProcessor for the provided SpEL expression and expected result type.

Usage

From source file:org.springframework.integration.file.remote.RemoteFileTemplate.java

/**
 * Set the remote directory expression used to determine the remote directory to which
 * files will be sent.// w  w  w.  j  a v  a 2 s .  c  o m
 * @param remoteDirectoryExpression the remote directory expression.
 */
public void setRemoteDirectoryExpression(Expression remoteDirectoryExpression) {
    Assert.notNull(remoteDirectoryExpression, "remoteDirectoryExpression must not be null");
    this.directoryExpressionProcessor = new ExpressionEvaluatingMessageProcessor<>(remoteDirectoryExpression,
            String.class);
}

From source file:org.springframework.integration.file.remote.RemoteFileTemplate.java

/**
 * Set a temporary remote directory expression; used when transferring files to the remote
 * system. After a successful transfer the file is renamed using the
 * {@link #setRemoteDirectoryExpression(Expression) remoteDirectoryExpression}.
 * @param temporaryRemoteDirectoryExpression the temporary remote directory expression.
 *///  w w  w.j ava2  s. com
public void setTemporaryRemoteDirectoryExpression(Expression temporaryRemoteDirectoryExpression) {
    Assert.notNull(temporaryRemoteDirectoryExpression, "temporaryRemoteDirectoryExpression must not be null");
    this.temporaryDirectoryExpressionProcessor = new ExpressionEvaluatingMessageProcessor<>(
            temporaryRemoteDirectoryExpression, String.class);
}

From source file:org.springframework.integration.file.remote.RemoteFileTemplate.java

/**
 * Set the file name expression to determine the full path to the remote file when retrieving
 * a file using the {@link #get(Message, InputStreamCallback)} method, with the message
 * being the root object of the evaluation.
 * @param fileNameExpression the file name expression.
 *//*from  w  w w  .j a  v  a2s .co m*/
public void setFileNameExpression(Expression fileNameExpression) {
    Assert.notNull(fileNameExpression, "fileNameExpression must not be null");
    this.fileNameProcessor = new ExpressionEvaluatingMessageProcessor<>(fileNameExpression, String.class);
}