1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
package org.mule.registry; |
8 | |
|
9 | |
import org.mule.api.MuleContext; |
10 | |
import org.mule.api.context.notification.ServerNotificationListener; |
11 | |
import org.mule.api.registry.PreInitProcessor; |
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
public class NotificationListenerProcessor implements PreInitProcessor |
18 | |
{ |
19 | |
private MuleContext context; |
20 | |
|
21 | |
public NotificationListenerProcessor(MuleContext context) |
22 | 0 | { |
23 | 0 | this.context = context; |
24 | 0 | } |
25 | |
|
26 | |
public Object process(Object object) |
27 | |
{ |
28 | 0 | if (object instanceof ServerNotificationListener) |
29 | |
{ |
30 | 0 | context.getNotificationManager().addListener((ServerNotificationListener) object); |
31 | |
} |
32 | 0 | return object; |
33 | |
} |
34 | |
} |