What would be the easiest way to implement your own downlink adapter?
I need a custom adapter that will poll a custom resource. (It returns a list of files.)
Can he implement and use it in spring integration?
What would be the best practice for introducing such a resource that could be contaminated?
+3
Ferenc turi
source
to share
1 answer
See <inbound-channel-adapter>
:
<int:inbound-channel-adapter ref="source1" method="method1" channel="channel1">
<int:poller fixed-rate="5000"/>
</int:inbound-channel-adapter>
Where source1
there is something like:
public class MyService {
public List<File> method1() {
....
}
}
Your method will be called for every interval fixed-rate
.
+4
Artem Bilan
source
to share