1
2
3
4
5
6
7
8
9
10
11 package org.mule.test.construct;
12
13 import org.mule.api.MuleEvent;
14 import org.mule.api.endpoint.OutboundEndpoint;
15 import org.mule.transport.file.FileMessageDispatcher;
16
17 public class SleepyFileMessageDispatcher extends FileMessageDispatcher
18 {
19 public SleepyFileMessageDispatcher(OutboundEndpoint endpoint)
20 {
21 super(endpoint);
22 }
23
24 @Override
25 protected void doDispatch(MuleEvent event) throws Exception
26 {
27 String sleepTime = event.getMessage().getInvocationProperty(
28 FlowSyncAsyncProcessingStrategyTestCase.SLEEP_TIME);
29
30 Thread.sleep(Integer.valueOf(sleepTime));
31
32 super.doDispatch(event);
33
34 }
35
36 }