@Override @SuppressWarnings("unchecked") public Object getValue(Object rootObject) throws EvaluationException { return this.function.apply((S) rootObject); }
@Override @SuppressWarnings("unchecked") public Object getValue(Object rootObject) throws EvaluationException { return this.function.apply((S) rootObject); }
@Override public Object getValue() throws EvaluationException { return this.function.apply(null); }
@Override public Object getValue() throws EvaluationException { return this.function.apply(null); }
/** * Populate a {@link MessageChannel} instance * at the current {@link IntegrationFlow} chain position using the {@link Channels} * factory fluent API. * @param channels the {@link Function} to use. * @return the current {@link IntegrationFlowDefinition}. */ public B channel(Function<Channels, MessageChannelSpec<?, ?>> channels) { Assert.notNull(channels, "'channels' must not be null"); return channel(channels.apply(new Channels())); }
/** * Populate a {@link MessageChannel} instance * at the current {@link IntegrationFlow} chain position using the {@link Channels} * factory fluent API. * @param channels the {@link Function} to use. * @return the current {@link IntegrationFlowDefinition}. */ public B channel(Function<Channels, MessageChannelSpec<?, ?>> channels) { Assert.notNull(channels, "'channels' must not be null"); return channel(channels.apply(new Channels())); }
/** * @param pollers the pollers * @return the endpoint spec. * @see AbstractPollingEndpoint * @see PollerFactory */ public S poller(Function<PollerFactory, PollerSpec> pollers) { return poller(pollers.apply(new PollerFactory())); }
/** * @param pollers the pollers * @return the endpoint spec. * @see AbstractPollingEndpoint * @see PollerFactory */ public S poller(Function<PollerFactory, PollerSpec> pollers) { return poller(pollers.apply(new PollerFactory())); }
/** * Populate a {@link ServiceActivatingHandler} for the selected protocol specific * {@link MessageHandler} implementation from {@link Adapters} factory. * In addition accept options for the integration endpoint using {@link GenericEndpointSpec}. * Typically used with a Java 8 Lambda expression: * <pre class="code"> * {@code * .handleWithAdapter(a -> * a.jmsGateway(this.jmsConnectionFactory) * .replyContainer() * .requestDestination("fooQueue"), * e -> e.autoStartup(false)) * } * </pre> * @param adapters the {@link Function} to select and configure protocol specific * {@link MessageHandler}. * @param endpointConfigurer the {@link Consumer} to provide integration endpoint options. * @param <H> the target {@link MessageHandler} type. * @return the current {@link IntegrationFlowDefinition}. * @see MessageHandlerSpec * @see GenericEndpointSpec */ public <H extends MessageHandler> B handleWithAdapter(Function<Adapters, MessageHandlerSpec<?, H>> adapters, Consumer<GenericEndpointSpec<H>> endpointConfigurer) { return handle(adapters.apply(new Adapters()), endpointConfigurer); }
/** * Populate a {@link ServiceActivatingHandler} for the selected protocol specific * {@link MessageHandler} implementation from {@link Adapters} factory. * In addition accept options for the integration endpoint using {@link GenericEndpointSpec}. * Typically used with a Java 8 Lambda expression: * <pre class="code"> * {@code * .handleWithAdapter(a -> * a.jmsGateway(this.jmsConnectionFactory) * .replyContainer() * .requestDestination("fooQueue"), * e -> e.autoStartup(false)) * } * </pre> * @param adapters the {@link Function} to select and configure protocol specific * {@link MessageHandler}. * @param endpointConfigurer the {@link Consumer} to provide integration endpoint options. * @param <H> the target {@link MessageHandler} type. * @return the current {@link IntegrationFlowDefinition}. * @see MessageHandlerSpec * @see GenericEndpointSpec */ public <H extends MessageHandler> B handleWithAdapter(Function<Adapters, MessageHandlerSpec<?, H>> adapters, Consumer<GenericEndpointSpec<H>> endpointConfigurer) { return handle(adapters.apply(new Adapters()), endpointConfigurer); }