1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
package org.mule.impl.model.streaming; |
11 | |
|
12 | |
import org.mule.impl.MuleDescriptor; |
13 | |
import org.mule.impl.model.AbstractModel; |
14 | |
import org.mule.impl.model.resolvers.StreamingEntryPointResolver; |
15 | |
import org.mule.umo.UMOComponent; |
16 | |
import org.mule.umo.UMODescriptor; |
17 | |
import org.mule.umo.model.UMOEntryPointResolver; |
18 | |
|
19 | |
|
20 | |
|
21 | |
|
22 | |
public class StreamingModel extends AbstractModel |
23 | |
{ |
24 | |
|
25 | |
|
26 | |
public StreamingModel() |
27 | |
{ |
28 | 0 | super(); |
29 | |
|
30 | 0 | setEntryPointResolver(new StreamingEntryPointResolver()); |
31 | 0 | } |
32 | |
|
33 | |
protected UMOComponent createComponent(UMODescriptor descriptor) |
34 | |
{ |
35 | 0 | return new StreamingComponent((MuleDescriptor) descriptor, this); |
36 | |
} |
37 | |
|
38 | |
public String getType() |
39 | |
{ |
40 | 0 | return "streaming"; |
41 | |
} |
42 | |
|
43 | |
|
44 | |
|
45 | |
|
46 | |
|
47 | |
|
48 | |
|
49 | |
public void setEntryPointResolver(UMOEntryPointResolver entryPointResolver) |
50 | |
{ |
51 | 0 | if (!(entryPointResolver instanceof StreamingEntryPointResolver)) |
52 | |
{ |
53 | 0 | throw new IllegalArgumentException("EntrypointResolver needs to be an instance of " + StreamingEntryPointResolver.class.getName()); |
54 | |
} |
55 | 0 | super.setEntryPointResolver(entryPointResolver); |
56 | 0 | } |
57 | |
|
58 | |
} |