Exemple #1
0
  @PostConstruct
  public void init() {
    imBridge = new WebQQBridge();
    imBridge.setApp(this);

    UIEventDispatcher uiEventDispatcher = new UIEventDispatcher(this);
    eventService.register(uiEventDispatcher.getEventTypes(), uiEventDispatcher);
  }
Exemple #2
0
  @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));
  }