commit
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.budwk.app.base.event.role;
|
||||
|
||||
import org.nutz.ioc.Ioc;
|
||||
import org.nutz.mvc.Mvcs;
|
||||
|
||||
/**
|
||||
@@ -12,9 +13,14 @@ import org.nutz.mvc.Mvcs;
|
||||
public class RoleEventPublisher {
|
||||
|
||||
public static void broadcast(RoleEventMsg event){
|
||||
String[] names = Mvcs.getIoc().getNamesByType(RoleEventListener.class);
|
||||
Ioc ioc = Mvcs.getIoc();
|
||||
if (ioc == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
String[] names = ioc.getNamesByType(RoleEventListener.class);
|
||||
for (String name : names) {
|
||||
RoleEventListener listener = Mvcs.getIoc().get(RoleEventListener.class, name);
|
||||
RoleEventListener listener = ioc.get(RoleEventListener.class, name);
|
||||
listener.receive(event);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user