<P> FileWritingMessageHandlerSpec(Function<Message<P>, ?> directoryFunction) { this(new FunctionExpression<>(directoryFunction)); }
@Override public <T> T getValue(Class<T> desiredResultType) throws EvaluationException { return getValue(this.defaultContext, desiredResultType); }
public FunctionExpression(Function<S, ?> function) { Assert.notNull(function, "'function' must not be null."); this.function = function; this.readOnlyException = new EvaluationException(getExpressionString(), "FunctionExpression is a 'read only' Expression implementation"); }
UdpMulticastOutboundChannelAdapterSpec(Function<Message<?>, ?> destinationFunction) { this.target = new MulticastSendingMessageHandler(new FunctionExpression<>(destinationFunction)); }
@Override public <T> T getValue(Object rootObject, Class<T> desiredResultType) throws EvaluationException { return getValue(this.defaultContext, rootObject, desiredResultType); }
public FunctionExpression(Function<S, ?> function) { Assert.notNull(function, "'function' must not be null."); this.function = function; this.readOnlyException = new EvaluationException(getExpressionString(), "FunctionExpression is a 'read only' Expression implementation"); }
AbstractUdpOutboundChannelAdapterSpec(Function<Message<?>, ?> destinationFunction) { this.target = new UnicastSendingMessageHandler(new FunctionExpression<>(destinationFunction)); }
@Override public Object getValue(EvaluationContext context, Object rootObject) throws EvaluationException { return getValue(rootObject); }
/** * Specify a {@link Function} to determine {@link HttpMethod} at runtime. * @param httpMethodFunction The HTTP method {@link Function}. * @param <P> the payload type. * @return the spec */ public <P> S httpMethodFunction(Function<Message<P>, ?> httpMethodFunction) { return httpMethodExpression(new FunctionExpression<>(httpMethodFunction)); }
/** * Configure the {@link ExpressionFileListFilter}. * @param filterFunction the {@link Function} for files filtering. * @return the spec. * @see AbstractRemoteFileStreamingMessageSource#setFilter(FileListFilter) * @see ExpressionFileListFilter */ public S filterFunction(Function<F, Boolean> filterFunction) { this.expressionFileListFilter = new ExpressionFileListFilter<>(new FunctionExpression<>(filterFunction)); return filter(this.expressionFileListFilter); }
@Override public <T> T getValue(EvaluationContext context, Class<T> desiredResultType) throws EvaluationException { return ExpressionUtils.convertTypedValue(context, new TypedValue(getValue(context)), desiredResultType); }
/** * A {@link Function} which should resolve to a {@link Query} instance. * @param queryFunction the {@link Function} to use. * @param <P> the type of the message payload. * @return the spec */ public <P> MongoDbOutboundGatewaySpec queryFunction(Function<Message<P>, Query> queryFunction) { this.target.setQueryExpression(new FunctionExpression<>(queryFunction)); return this; }
@Override public <T> T getValue(EvaluationContext context, Object rootObject, Class<T> desiredResultType) throws EvaluationException { return ExpressionUtils.convertTypedValue(context, new TypedValue(getValue(rootObject)), desiredResultType); }
/** * Configure a {@link Function} to be invoked to generate the local file name; * argument passed to the {@code apply} method is the remote file name. * @param localFilenameFunction the localFilenameFunction. * @return the spec. * @see FunctionExpression */ public S localFilename(Function<String, String> localFilenameFunction) { return localFilenameExpression(new FunctionExpression<>(localFilenameFunction)); }
@Override public <T> T getValue(Class<T> desiredResultType) throws EvaluationException { return getValue(this.defaultContext, desiredResultType); }
/** * Set a function that will be invoked to return the subject based on the message. * @param subject the function. * @param <P> the message payload type. * @return the builder. */ public <P> MailHeadersBuilder subjectFunction(Function<Message<P>, String> subject) { return put(MailHeaders.SUBJECT, new FunctionExpression<Message<P>>(subject)); }
@Override public <T> T getValue(Object rootObject, Class<T> desiredResultType) throws EvaluationException { return getValue(this.defaultContext, rootObject, desiredResultType); }
/** * Set a function that will be invoked to determine the To: addresses based on the * message. * @param to the function. * @param <P> the message payload type. * @return the builder. */ public <P> MailHeadersBuilder toFunction(Function<Message<P>, String[]> to) { return put(MailHeaders.TO, new FunctionExpression<Message<P>>(to)); }
@Override public Object getValue(EvaluationContext context, Object rootObject) throws EvaluationException { return getValue(rootObject); }