Commit Graph

75 Commits

Author SHA1 Message Date
Artem Bilan
a04cdbf77f DSL: Register AELMP as AL in the AEM
Register `ApplicationEventListeningMessageProducer` as `ApplicationListener` in the `ApplicationEventMulticaster`

Since `ApplicationContext` invokes its `registerListeners()` before the `IntegrationFlowBeanPostProcessor` does its stuff,
the `ApplicationEventListeningMessageProducer` hasn't been visible as an `ApplicationListener` bean, when it is defined from `IntegrationFlow`,
hence add a logic to register it to the `ApplicationEventMulticaster` from `IntegrationFlowBeanPostProcessor`.
2014-11-08 19:53:36 +02:00
Artem Bilan
13ea2d9111 DSL: Fix RouterSpec for several subflows
The root of the issue is the order of bean registration in the beanFactory.
In this case the first subflows is registered correctly, but the next one has been registered after `RouterSubFlowMappingProvider`.
In this case the input `channel` of the next subflow hasn't been registered yet, hence `NPE` in the `this.router.setChannelMapping`
from `@PostConstruct` of `RouterSubFlowMappingProvider`.

Move the `RouterSubFlowMappingProvider` to end of `componentsToRegister` collection to give a chance to register all subflows before the `RouterSubFlowMappingProvider`.
2014-11-01 10:50:59 -04:00
Spring Buildmaster
e144feb1b3 [artifactory-release] Next development version 2014-10-31 12:07:29 -07:00
Spring Buildmaster
879024d97e [artifactory-release] SI Java DSL release version 1.0.0.RC1 2014-10-31 12:07:24 -07:00
Artem Bilan
c3477801e6 DSL: .gateway() SubFlow support 2014-10-31 19:15:26 +02:00
Artem Bilan
e6af7f7eba DSL: RecipientListRouter: Add SubFlow support 2014-10-31 13:43:26 +02:00
Artem Bilan
be9767b8a9 DSL: Introduce SubFlows
Add `subFlow` support for `router`s
Move some tests to separate domain classes
Fix some component registrations

DSL: Fix `SubFlow` registration according PR discussion

* Add IO plugin
* Fix SI 4.0 <-> 4.1 compatibility by `springIoCheck` results
* Further divide for tests to separate domain classes

DSL: Add `discardFlow` to the `.filter()`

Make `.router()` `subFlow`s as `always return to the main flow`

Add `.publishSubscribeChannel()` EIP-method with `.subscriber()`

to specify subscribers as `subFlow`s

Polishing
2014-10-30 16:57:19 -04:00
Artem Bilan
74102a022d DSL: Fix package tangles 2014-10-29 12:43:40 +02:00
Artem Bilan
4005ff874d Java DSL: Introduce FunctionExpression
Add support for `FunctionExpression` and apply it alongside with `expression`, where it is possible
For example:
```
.enrich(e -> e.requestChannel("enrichChannel")
		.requestPayload(Message::getPayload)
		.shouldClonePayload(false)
		.<Map<String, String>>headerFunction("foo", m -> m.getPayload().get("name")))
```
Remove redundant functional interfaces in favor of `Function`

FunctionExpression: Add JDBC Splitter sample

Minor Polishing to FunctionExpression

FunctionExpression: JavaDocs
2014-10-28 15:14:44 -04:00
Artem Bilan
cab77b5e76 Java DSL: Lambdas for Namespace Factories
* Add `Function` and `Consumer` copies from Java 8
* Rework some functional interfaces to `Function` or `Consumer`
* Introduce `Channels`, `MessageHandlers`, `MessageProducers`, `MessageSources`, `MessagingGateways`
- some convenient wrappers for Namespace Factories to be used from Lambdas
* Add Lambda-methods for those new wrappers
* Provide some refactoring
* Upgrade to Boot `1.1.7`

Java DSL: Lambda_Factories

* Change all `IntegrationFlows` methods to `.from()`
* Introduce internal `Function<?, ?>` extensions for particular cases, e.g. `MessageSourcesFunction`.
Now end-user has to cast Lambda parameter to concrete type to get desired factory, e.g.:
```
return IntegrationFlows.from((MessageProducers mp) -> mp.imap("imap://user:pw@host/INBOX"))
```
* rename `.fromFixedMessageChannel` to `.from()` with additional boolean flag
* Introduce `PollerFactory` Lambda for `.poller()` EIP-method on `EndpointSpec`
* Move `Pollers` stuff to the `.core` package to fix package tangle
* Refactoring for some code style
* Fix some typos
2014-10-07 15:11:32 +03:00
Artem Bilan
db05476acf Fix some ChannelName Late Resolution
Polishing
2014-09-17 15:21:16 +03:00
Gary Russell
87745d43a1 DSL: MailTests - SearchTermStrategy
Change lamda expression to a Method reference.
2014-09-10 10:55:47 -05:00
Spring Buildmaster
782999f576 [artifactory-release] Next development version 2014-09-08 04:46:06 -07:00
Spring Buildmaster
16b363a045 [artifactory-release] SI Java DSL Release version 1.0.0.M3 2014-09-08 04:46:02 -07:00
Gary Russell
070252961d DSL: Fix Tail Tests
Timing problem - set end(false), don't start adapter until file
is written.
2014-09-07 16:28:14 -05:00
Artem Bilan
ff4a229bc5 INTEXT-114 Fix outputChannel population AOP issue
JIRA: https://jira.spring.io/browse/INTEXT-114
2014-09-07 11:37:29 -05:00
Artem Bilan
eb5456f9d7 Upgrade to SI 4.0.4 and Boot 1.1.6 2014-09-05 13:02:42 +03:00
Artem Bilan
2ff83c61d9 INTEXT-113: Make .route() as non-last component
JIRA: https://jira.spring.io/browse/INTEXT-113

Previously `router` could be configured only as last component in the `IntegrationFlow` definition.

* Remove `defaultOutputChannel` options from `AbstractRouterSpec`
* Populate `outputChannel` to the `AbstractMessageRouter.defaultOutputChannel`, when there is more EIP-methods after `.route()`
* Rename EIP-method `.recipientListRoute()` to the `.routeToRecipients()`
* Make compatibility with SI 4.1
* Tested against SF 4.1
2014-09-04 11:19:54 +03:00
Artem Bilan
4b5bbb6412 DSL: Add enrichHeaders(Map) EIP-method
* Introduce `MapBuilder` and its custom inheritor - `MailHeadersBuilder`
* Add `HeaderEnricherSpec.headers(MapBuilder)` and `.headers(Map)`
* Change `MailTests` to use new `Mail.headers()` and new `IntegrationFlowDefinition.enrichHeaders(MapBuilder)`
* Change `mailapi` dependency to the IO's `javax.mail`

Polishing - Add headerExpressions()

More Polishing - Add Configurer

Polishing - PR Comments

- Move MapBuilderConfigurer to superclass.
- Move PropertiesBuilderConfigurer into PropertiesBuilder.
2014-08-27 18:08:52 -04:00
Artem Bilan
238c1f06b9 Polishing after rebase 2014-08-26 18:35:19 +03:00
Artem Bilan
f0bfe4656d DSL: Add support for IntegrationFlow Lambda
To simplify a bit the `direct` integration flow definition, the `IntegrationFlow` Lambda is introduced.

* Extract `IntegrationFlow` functional interface with `define(IntegrationFlowDefinition<?> flow)` method.
* Rename existing `IntegrationFlow` class to the `StandardIntegrationFlow` and move it to the inner class within `IntegrationFlowBuilder`
* Extract `IntegrationFlowDefinition` superclass for the `IntegrationFlowBuilder` to be used within `IntegrationFlow` Lambda
to hide `get()` method from end-users.
* Change `IntegrationFlowBeanPostProcessor` for a new logic around `IntegrationFlow` Lambda
* Rename `MessagingProducerSpec` to the `MessageProducerSpec`

Conflicts:
	spring-integration-java-dsl/src/main/java/org/springframework/integration/dsl/IntegrationFlowBuilder.java
2014-08-26 18:29:00 +03:00
Gary Russell
a5bb4e125f DSL: Mail - Add IMAP Idle Adapter
Polish IMAP test server and update it to support IDLE.

Polishing

Polishing - Fix IMAP Server

Changes required because receiver is now initialized.
2014-08-26 16:43:14 +03:00
Gary Russell
c67320e7bc DSL: Mail Polish - Add SearchTerm (lambda) To Test 2014-08-23 09:46:34 -04:00
Gary Russell
89cb4e137d DSL: Mail Inbound Adapters
Add POP3 Server for Tests

Polishing; PR Comments; IMAP4 Server
2014-08-23 10:42:15 +03:00
Gary Russell
ba4f52d59c DSL: Mail namespace & MailSendingMessageHandler
DSL:Add SMTP Mail Server

Polishing - PR Comments

DSL: Mail: add `PropertiesConfigurer` lambda

* Move `IntegrationFlowTests` to the `flows` package to avoid cross scanning for components
* Make `MailTests` as integration test and move `Mail.outboundAdapter` to the `IntegrationFlow` `@Bean` definition
2014-08-22 16:37:29 +03:00
Artem Bilan
5f4089db0a DSL-(S)FTP-Namespace-Builder-Factory
**DO NOT MERGE YET**.

There is need to provide tests on the matter.

(S)FTP Tests

* Add test cases for (s)ftp components based on embedded (S)FtpServers
* Upgrade some dependencies
* Fix bug in the `IntegrationFlowBeanPostProcessor` for the registration internal (a result of `MessageSourceSpec`) as a bean in the AC
2014-08-20 17:32:40 +03:00
Tim Ysewyn
1b1f95c004 Java DSL: Fix EnricherSpec to prevent assertions
Fixes: https://github.com/spring-projects/spring-integration-extensions/issues/101
2014-08-20 17:28:48 +03:00
Artem Bilan
8cc38bc1b7 DSL: Add File. Namespace Builder Factory
* Introduce `ComponentsRegistration` *marker* to extract internal components from the `IntegrationComponentSpec` to be registered as bean in the application context
* Add `ConsumerEndpointSpec#order(int order)` for the `order` of target `AbstractMessageHandler`
* Fix `AggregatorSpec` to use `DefaultAggregatingMessageGroupProcessor` by default
* Fix `IntegrationFlowBeanPostProcessor#generateBeanName` to check if `instance instanceof NamedComponent` and its `beanName` has been configured
using `IntegrationComponentSpec#id`
2014-08-13 13:50:09 +03:00
Artem Bilan
7b59bc5b87 DSL: Add targetCompatibility = 1.6 2014-07-23 19:02:23 +03:00
Artem Bilan
f6c9f1305b DSL: Fixes and polishing after upgrade
* Upgrade to SI 4.0.3 and Boot 1.1.4
* Add `HeaderEnricherSpec#headerChannelsToString()`
* Fix `DslRecipientListRouter` according core changes
* Fix `Amqp` and `Jms` modules for the bug around "All Message creators need a BeanFactory"
using fake `new DefaultListableBeanFactory()` for `(Amqp)JmsChannelFactoryBean`
2014-07-17 14:53:17 +03:00
Artem Bilan
906880acf0 DSL: Use DelayerEndpointSpec for .delay()
GH: https://github.com/spring-projects/spring-integration-extensions/issues/84
2014-07-01 14:49:53 +03:00
Spring Buildmaster
2b049dd478 [artifactory-release] Next development version Java DSL 2014-06-19 06:03:36 -07:00
Spring Buildmaster
5bb2e40ecc [artifactory-release] Release version Java DSL 1.0.0.M2 2014-06-19 06:03:32 -07:00
Artem Bilan
3085f71277 DSL: Add Jms.messageDriverAdapter 2014-06-13 21:20:16 +03:00
Artem Bilan
1307646c3c DSL: Polishing for priorityChannel test 2014-06-12 18:24:12 +03:00
Artem Bilan
a35db31e61 DSL: Add Jms.inboundGateway() infrastructure 2014-06-12 18:16:43 +03:00
Artem Bilan
b42e6e1503 DSL: JMS in/out adapters, outbound gateway
* Others fixes, improvements and refactoring
2014-06-11 19:16:57 +03:00
Artem Bilan
7394516a2d DSL: Add Jms factory
* Add `Spec` implementations for `JmsChannel`s
* Fix the bug around `SourcePollingChannelAdapterFactoryBean` named bean registration
* Remove unused classes
* Add test for `Jms.pollableChannel`
2014-06-10 18:42:23 +03:00
Artem Bilan
36063ec8f2 DSL: Add Amqp.*channel() support
* Upgrade to the latest Boot snapshot
* Polishing and workarounds for `Proxy` beans. Caused by `@EnableJmx`
2014-06-09 13:54:40 +03:00
Artem Bilan
dd085c8945 DSL: Fix @Autowired issue for IntegrationFlows
* Move DSL parser logic from `BFPP` to `BPP` as soon as the DSL doesn't populate any `BeanDefinition` - just real objects,
which can be registered with `this.beanFactory.registerSingleton(beanName, component);`
* Add more DSL for `Amqp` 'Namespace' factory and provide tests on the matter
* Comment out `spring-integration-jdbc` and `spring-integration-jpa` dependecies because the provide `spring-jdbc` dependency,
but it causes an issue in Boot: https://github.com/spring-projects/spring-boot/issues/1041
2014-06-06 00:38:21 +03:00
Artem Bilan
2dd27c5df9 DSL: Clean up some IntegrationFlowBuilder API 2014-06-02 16:57:33 +03:00
Artem Bilan
f7529453b4 DSL: Tests for @Autowired handlers 2014-05-29 16:04:51 +03:00
Artem Bilan
7fe2845cd0 DSL: Add @Autowired @Lazy test 2014-05-28 08:46:55 +03:00
Artem Bilan
3c5db06ed7 DSL: Add LambdaMessageProcessor 2014-05-26 18:33:12 +03:00
Artem Bilan
2a25a1960f DSL: add gateway() EIP-method
* Upgrade dependencies
* Polishing `Transformers`
2014-05-22 20:43:38 +03:00
Artem Bilan
77026e8261 DSL: Add IntegrationFlows.from(MGSupport)
* Introduce `Amqp` components factory
* Add `AmqpInboundGatewaySpec` builder
2014-05-19 20:52:51 +03:00
Artem Bilan
38269df437 DSL: Add fluent Transformers factory 2014-05-15 23:06:56 +03:00
Artem Bilan
61275dbc7e DSL: Add MessageProducer support 2014-05-11 22:57:38 +03:00
Spring Buildmaster
54f8cd306d [artifactory-release] Next development version 2014-05-08 11:07:21 -07:00
Spring Buildmaster
a779d7f8ff [artifactory-release] Release version 1.0.0.M1 2014-05-08 11:07:12 -07:00