@PostConstruct public void init() { imBridge = new WebQQBridge(); imBridge.setApp(this); UIEventDispatcher uiEventDispatcher = new UIEventDispatcher(this); eventService.register(uiEventDispatcher.getEventTypes(), uiEventDispatcher); }
@UIEventHandler(UIEventType.lOGIN_REQUEST) private void onLoginEvent(UIEvent uiEvent) { LoginInfoParam param = (LoginInfoParam) uiEvent.getTarget(); LoginRequest req = new LoginRequest(); req.setUsername(param.getUsername()); req.setPassword(param.getPassword()); req.setStatus(param.getStatus()); imBridge.onIMEvent(new IMEvent(IMEventType.LOGIN_REQUEST, req)); }