Commit Graph

30 Commits

Author SHA1 Message Date
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
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
Artem Bilan
eb5456f9d7 Upgrade to SI 4.0.4 and Boot 1.1.6 2014-09-05 13:02:42 +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
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
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
3085f71277 DSL: Add Jms.messageDriverAdapter 2014-06-13 21:20:16 +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
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
Artem Bilan
6664d413d4 DSL: Upgrade to SI 4.0. RELEASE 2014-04-30 17:32:21 +03:00
Artem Bilan
305504196b Upgrade to SI 4.0
* Add new correlation endpoint options
* Add `messageStore` to the `PriorityChannelSpec`
* Add generic to `EnricherSpec#property`
* Remove `type` from `EnricherSpec.headerExpression`
* Add `initialDelay` for `PeriodicTriggerSpec`
* Fix `IntegrationFlowBuilder` bugs, when there is no relevant the end of the flow
* Add embedded MongoDb support for tests
* Add `priority` test with `MongoDbChannelMessageStore`
2014-04-16 15:22:55 +03:00
Artem Bilan
eee9dc4163 Add split() and enrichHeaders() EIP-methods 2014-03-10 20:54:26 +02:00
Artem Bilan
feb610d92b Add enrich() and channel names option 2014-03-05 20:36:51 +02:00
Artem Bilan
c161210c3e Introduce method-invoking handle
* Add generic argument to `GenericEndpointSpec`.
Since `EndpointSpec#get()` returns `Tuple` with `EndpointFactoryBean` and `MessageHandler` objects
it is useful to get deal with specific generic for further `MessageHandler` configuration within `EndpointConfigurer` lambda
* Change DSL-methods to get deal deal with those generics.
* Add `FileWritingMessageHandler` test to demonstrate it.
* Fix bug around double `MessageHandler` bean registration from `DslIntegrationConfigurationInitializer`, when handler is a reference
to existing bean.
2014-02-17 17:11:41 +02:00
Artem Bilan
ac46625a83 Introduce EIP-methods handle() and bridge()
* Remove generic argument from `GenericEndpointSpec`: it isn't necessary
* Add check for `one-way` flow in case the last component isn't `MessageProducer`
2014-02-14 19:41:39 +02:00
Artem Bilan
1e6d50d33c Spec<?, ?> improvements
* Provide `id`-aware DSL methods for `MessageChannelSpec`
* Rework `DslIntegrationConfigurationInitializer` to delegate to `IntegrationFlowBeanPostProcessor`
to allow to use components from `IntegrationFlowBuilder` via `@Autowired`
2014-02-13 21:44:48 +02:00
Artem Bilan
eca4680f0e INTEXT-96: The Java DSL initial implementation
JIRA: https://jira.springsource.org/browse/INTEXT-96

* `MessageChannels` Builder
* Configuration infrastructure
* `Pollers` Builder
* Initial `IntegrationFlows` Builder
* `EndpointConfigurer` Specs
* EIP-methods `from(MessageSource)`, `from(MessageChannel)`, `transform`, `filter`
2014-02-12 00:40:58 +02:00
Artem Bilan
b0cc426d98 INTEXT-95: Create SI Java DSL Project
JIRA: https://jira.springsource.org/browse/INTEXT-95
2014-02-04 21:34:29 +02:00