/** * <p>notifyActionEvent.</p> * * @param type a {@link iqq.im.evt.QQActionEvent.Type} object. * @param target a {@link java.lang.Object} object. */ public void notifyActionEvent(QQActionEvent.Type type, Object target) { QQActionEvent evt = new QQActionEvent(type, target, this); if (proxyListener != null) { proxyListener(evt); } evtQueue.Enqueue(evt); }
/** {@inheritDoc} */ /** {@inheritDoc} */ public QQActionEvent waitFinalEvent() { QQActionEvent evt = null; while ((evt = evtQueue.Dequeue()) != null) { if (isFinalEvent(evt)) { return(evt); } } throw new QQException(QQWpfApplication1.action.QQException.QQErrorCode.UNKNOWN_ERROR); }
private Boolean isFinalEvent(QQActionEvent evt) { QQActionEvent.Type type = evt.getType(); return(type == QQActionEvent.Type.EVT_ERROR || type == QQActionEvent.Type.EVT_OK); }