當前位置: 首頁>>代碼示例>>Java>>正文


Java IMXEventListener類代碼示例

本文整理匯總了Java中org.matrix.androidsdk.listeners.IMXEventListener的典型用法代碼示例。如果您正苦於以下問題:Java IMXEventListener類的具體用法?Java IMXEventListener怎麽用?Java IMXEventListener使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


IMXEventListener類屬於org.matrix.androidsdk.listeners包,在下文中一共展示了IMXEventListener類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onStoreReady

import org.matrix.androidsdk.listeners.IMXEventListener; //導入依賴的package包/類
/**
 * Dispatch that the store is ready.
 */
public void onStoreReady() {
    if (null != mCryptoEventsListener) {
        mCryptoEventsListener.onStoreReady();
    }

    final List<IMXEventListener> eventListeners = getListenersSnapshot();

    mUiHandler.post(new Runnable() {
        @Override
        public void run() {
            for (IMXEventListener listener : eventListeners) {
                try {
                    listener.onStoreReady();
                } catch (Exception e) {
                    Log.e(LOG_TAG, "onStoreReady " + e.getMessage());
                }
            }
        }
    });
}
 
開發者ID:matrix-org,項目名稱:matrix-android-sdk,代碼行數:24,代碼來源:MXDataHandler.java

示例2: onAccountInfoUpdate

import org.matrix.androidsdk.listeners.IMXEventListener; //導入依賴的package包/類
@Override
public void onAccountInfoUpdate(final MyUser myUser) {
    if (null != mCryptoEventsListener) {
        mCryptoEventsListener.onAccountInfoUpdate(myUser);
    }

    final List<IMXEventListener> eventListeners = getListenersSnapshot();

    mUiHandler.post(new Runnable() {
        @Override
        public void run() {
            for (IMXEventListener listener : eventListeners) {
                try {
                    listener.onAccountInfoUpdate(myUser);
                } catch (Exception e) {
                    Log.e(LOG_TAG, "onAccountInfoUpdate " + e.getMessage());
                }
            }
        }
    });
}
 
開發者ID:matrix-org,項目名稱:matrix-android-sdk,代碼行數:22,代碼來源:MXDataHandler.java

示例3: onPresenceUpdate

import org.matrix.androidsdk.listeners.IMXEventListener; //導入依賴的package包/類
@Override
public void onPresenceUpdate(final Event event, final User user) {
    if (null != mCryptoEventsListener) {
        mCryptoEventsListener.onPresenceUpdate(event, user);
    }

    final List<IMXEventListener> eventListeners = getListenersSnapshot();

    mUiHandler.post(new Runnable() {
        @Override
        public void run() {
            for (IMXEventListener listener : eventListeners) {
                try {
                    listener.onPresenceUpdate(event, user);
                } catch (Exception e) {
                    Log.e(LOG_TAG, "onPresenceUpdate " + e.getMessage());
                }
            }
        }
    });
}
 
開發者ID:matrix-org,項目名稱:matrix-android-sdk,代碼行數:22,代碼來源:MXDataHandler.java

示例4: onLiveEventsChunkProcessed

import org.matrix.androidsdk.listeners.IMXEventListener; //導入依賴的package包/類
@Override
public void onLiveEventsChunkProcessed(final String startToken, final String toToken) {
    refreshUnreadCounters();

    if (null != mCryptoEventsListener) {
        mCryptoEventsListener.onLiveEventsChunkProcessed(startToken, toToken);
    }

    final List<IMXEventListener> eventListeners = getListenersSnapshot();

    mUiHandler.post(new Runnable() {
        @Override
        public void run() {
            for (IMXEventListener listener : eventListeners) {
                try {
                    listener.onLiveEventsChunkProcessed(startToken, toToken);
                } catch (Exception e) {
                    Log.e(LOG_TAG, "onLiveEventsChunkProcessed " + e.getMessage());
                }
            }
        }
    });
}
 
開發者ID:matrix-org,項目名稱:matrix-android-sdk,代碼行數:24,代碼來源:MXDataHandler.java

示例5: onBingEvent

import org.matrix.androidsdk.listeners.IMXEventListener; //導入依賴的package包/類
@Override
public void onBingEvent(final Event event, final RoomState roomState, final BingRule bingRule) {
    if (null != mCryptoEventsListener) {
        mCryptoEventsListener.onBingEvent(event, roomState, bingRule);
    }

    if (ignoreEvent(event.roomId)) {
        return;
    }

    final List<IMXEventListener> eventListeners = getListenersSnapshot();

    mUiHandler.post(new Runnable() {
        @Override
        public void run() {
            for (IMXEventListener listener : eventListeners) {
                try {
                    listener.onBingEvent(event, roomState, bingRule);
                } catch (Exception e) {
                    Log.e(LOG_TAG, "onBingEvent " + e.getMessage());
                }
            }
        }
    });
}
 
開發者ID:matrix-org,項目名稱:matrix-android-sdk,代碼行數:26,代碼來源:MXDataHandler.java

示例6: onEventSentStateUpdated

import org.matrix.androidsdk.listeners.IMXEventListener; //導入依賴的package包/類
@Override
public void onEventSentStateUpdated(final Event event) {
    if (ignoreEvent(event.roomId)) {
        return;
    }

    final List<IMXEventListener> eventListeners = getListenersSnapshot();

    mUiHandler.post(new Runnable() {
        @Override
        public void run() {
            for (IMXEventListener listener : eventListeners) {
                try {
                    listener.onEventSentStateUpdated(event);
                } catch (Exception e) {
                    Log.e(LOG_TAG, "onEventSentStateUpdated " + e.getMessage());
                }
            }
        }
    });
}
 
開發者ID:matrix-org,項目名稱:matrix-android-sdk,代碼行數:22,代碼來源:MXDataHandler.java

示例7: onEventSent

import org.matrix.androidsdk.listeners.IMXEventListener; //導入依賴的package包/類
@Override
public void onEventSent(final Event event, final String prevEventId) {
    if (null != mCryptoEventsListener) {
        mCryptoEventsListener.onEventSent(event, prevEventId);
    }

    if (ignoreEvent(event.roomId)) {
        return;
    }

    final List<IMXEventListener> eventListeners = getListenersSnapshot();

    mUiHandler.post(new Runnable() {
        @Override
        public void run() {
            for (IMXEventListener listener : eventListeners) {
                try {
                    listener.onEventSent(event, prevEventId);
                } catch (Exception e) {
                    Log.e(LOG_TAG, "onEventSent " + e.getMessage());
                }
            }
        }
    });
}
 
開發者ID:matrix-org,項目名稱:matrix-android-sdk,代碼行數:26,代碼來源:MXDataHandler.java

示例8: onBingRulesUpdate

import org.matrix.androidsdk.listeners.IMXEventListener; //導入依賴的package包/類
@Override
public void onBingRulesUpdate() {
    if (null != mCryptoEventsListener) {
        mCryptoEventsListener.onBingRulesUpdate();
    }

    final List<IMXEventListener> eventListeners = getListenersSnapshot();

    mUiHandler.post(new Runnable() {
        @Override
        public void run() {
            for (IMXEventListener listener : eventListeners) {
                try {
                    listener.onBingRulesUpdate();
                } catch (Exception e) {
                    Log.e(LOG_TAG, "onBingRulesUpdate " + e.getMessage());
                }
            }
        }
    });
}
 
開發者ID:matrix-org,項目名稱:matrix-android-sdk,代碼行數:22,代碼來源:MXDataHandler.java

示例9: dispatchOnInitialSyncComplete

import org.matrix.androidsdk.listeners.IMXEventListener; //導入依賴的package包/類
/**
 * Dispatch the onInitialSyncComplete event.
 */
private void dispatchOnInitialSyncComplete(final String toToken) {
    mInitialSyncToToken = toToken;

    refreshUnreadCounters();

    if (null != mCryptoEventsListener) {
        mCryptoEventsListener.onInitialSyncComplete(toToken);
    }

    final List<IMXEventListener> eventListeners = getListenersSnapshot();

    mUiHandler.post(new Runnable() {
        @Override
        public void run() {
            for (IMXEventListener listener : eventListeners) {
                try {
                    listener.onInitialSyncComplete(mInitialSyncToToken);
                } catch (Exception e) {
                    Log.e(LOG_TAG, "onInitialSyncComplete " + e.getMessage());
                }
            }
        }
    });
}
 
開發者ID:matrix-org,項目名稱:matrix-android-sdk,代碼行數:28,代碼來源:MXDataHandler.java

示例10: dispatchOnCryptoSyncComplete

import org.matrix.androidsdk.listeners.IMXEventListener; //導入依賴的package包/類
/**
 * Dispatch the OnCryptoSyncComplete event.
 */
private void dispatchOnCryptoSyncComplete() {
    final List<IMXEventListener> eventListeners = getListenersSnapshot();

    mUiHandler.post(new Runnable() {
        @Override
        public void run() {
            for (IMXEventListener listener : eventListeners) {
                try {
                    listener.onCryptoSyncComplete();
                } catch (Exception e) {
                    Log.e(LOG_TAG, "OnCryptoSyncComplete " + e.getMessage());
                }
            }
        }
    });
}
 
開發者ID:matrix-org,項目名稱:matrix-android-sdk,代碼行數:20,代碼來源:MXDataHandler.java

示例11: onNewRoom

import org.matrix.androidsdk.listeners.IMXEventListener; //導入依賴的package包/類
@Override
public void onNewRoom(final String roomId) {
    if (null != mCryptoEventsListener) {
        mCryptoEventsListener.onNewRoom(roomId);
    }

    if (ignoreEvent(roomId)) {
        return;
    }

    final List<IMXEventListener> eventListeners = getListenersSnapshot();

    mUiHandler.post(new Runnable() {
        @Override
        public void run() {
            for (IMXEventListener listener : eventListeners) {
                try {
                    listener.onNewRoom(roomId);
                } catch (Exception e) {
                    Log.e(LOG_TAG, "onNewRoom " + e.getMessage());
                }
            }
        }
    });
}
 
開發者ID:matrix-org,項目名稱:matrix-android-sdk,代碼行數:26,代碼來源:MXDataHandler.java

示例12: onJoinRoom

import org.matrix.androidsdk.listeners.IMXEventListener; //導入依賴的package包/類
@Override
public void onJoinRoom(final String roomId) {
    if (null != mCryptoEventsListener) {
        mCryptoEventsListener.onJoinRoom(roomId);
    }

    if (ignoreEvent(roomId)) {
        return;
    }

    final List<IMXEventListener> eventListeners = getListenersSnapshot();

    mUiHandler.post(new Runnable() {
        @Override
        public void run() {
            for (IMXEventListener listener : eventListeners) {
                try {
                    listener.onJoinRoom(roomId);
                } catch (Exception e) {
                    Log.e(LOG_TAG, "onJoinRoom " + e.getMessage());
                }
            }
        }
    });
}
 
開發者ID:matrix-org,項目名稱:matrix-android-sdk,代碼行數:26,代碼來源:MXDataHandler.java

示例13: onRoomInitialSyncComplete

import org.matrix.androidsdk.listeners.IMXEventListener; //導入依賴的package包/類
@Override
public void onRoomInitialSyncComplete(final String roomId) {
    if (null != mCryptoEventsListener) {
        mCryptoEventsListener.onRoomInitialSyncComplete(roomId);
    }

    if (ignoreEvent(roomId)) {
        return;
    }

    final List<IMXEventListener> eventListeners = getListenersSnapshot();

    mUiHandler.post(new Runnable() {
        @Override
        public void run() {
            for (IMXEventListener listener : eventListeners) {
                try {
                    listener.onRoomInitialSyncComplete(roomId);
                } catch (Exception e) {
                    Log.e(LOG_TAG, "onRoomInitialSyncComplete " + e.getMessage());
                }
            }
        }
    });
}
 
開發者ID:matrix-org,項目名稱:matrix-android-sdk,代碼行數:26,代碼來源:MXDataHandler.java

示例14: onRoomInternalUpdate

import org.matrix.androidsdk.listeners.IMXEventListener; //導入依賴的package包/類
@Override
public void onRoomInternalUpdate(final String roomId) {
    if (null != mCryptoEventsListener) {
        mCryptoEventsListener.onRoomInternalUpdate(roomId);
    }

    if (ignoreEvent(roomId)) {
        return;
    }

    final List<IMXEventListener> eventListeners = getListenersSnapshot();

    mUiHandler.post(new Runnable() {
        @Override
        public void run() {
            for (IMXEventListener listener : eventListeners) {
                try {
                    listener.onRoomInternalUpdate(roomId);
                } catch (Exception e) {
                    Log.e(LOG_TAG, "onRoomInternalUpdate " + e.getMessage());
                }
            }
        }
    });
}
 
開發者ID:matrix-org,項目名稱:matrix-android-sdk,代碼行數:26,代碼來源:MXDataHandler.java

示例15: onNotificationCountUpdate

import org.matrix.androidsdk.listeners.IMXEventListener; //導入依賴的package包/類
@Override
public void onNotificationCountUpdate(final String roomId) {
    if (null != mCryptoEventsListener) {
        mCryptoEventsListener.onNotificationCountUpdate(roomId);
    }

    if (ignoreEvent(roomId)) {
        return;
    }

    final List<IMXEventListener> eventListeners = getListenersSnapshot();

    mUiHandler.post(new Runnable() {
        @Override
        public void run() {
            for (IMXEventListener listener : eventListeners) {
                try {
                    listener.onNotificationCountUpdate(roomId);
                } catch (Exception e) {
                    Log.e(LOG_TAG, "onNotificationCountUpdate " + e.getMessage());
                }
            }
        }
    });
}
 
開發者ID:matrix-org,項目名稱:matrix-android-sdk,代碼行數:26,代碼來源:MXDataHandler.java


注:本文中的org.matrix.androidsdk.listeners.IMXEventListener類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。