1
2
3
4
5
6
7
8
9
10
11 package org.mule.routing.inbound;
12
13 import org.mule.umo.UMOEvent;
14
15 import java.util.Comparator;
16
17
18
19
20
21 public final class CorrelationSequenceComparator implements Comparator
22 {
23
24 public CorrelationSequenceComparator()
25 {
26 super();
27 }
28
29 public int compare(Object o1, Object o2)
30 {
31 int val1 = ((UMOEvent)o1).getMessage().getCorrelationSequence();
32 int val2 = ((UMOEvent)o2).getMessage().getCorrelationSequence();
33
34 if (val1 == val2)
35 {
36 return 0;
37 }
38 else if (val1 > val2)
39 {
40 return 1;
41 }
42 else
43 {
44 return -1;
45 }
46 }
47
48 }