/** * Post the event. * * @param object the event. */ @Override public void post(Object object) { post(object, Channel.DEFAULT); }
/** * Post the event. * * @param object the event. */ @Override public void post(Object object) { post(object, Channel.DEFAULT); }
private void postOnDefaultChannel(String postingThread) { NYBus.get().post(new ComputationThreadEvent(postingThread)); NYBus.get().post(new ExecutorThreadEvent(postingThread)); NYBus.get().post(new IOThreadEvent(postingThread)); NYBus.get().post(new MainThreadEvent(postingThread)); NYBus.get().post(new NewThreadEvent(postingThread)); NYBus.get().post(new PostingThreadEvent(postingThread)); NYBus.get().post(new TrampolineThreadEvent(postingThread)); }
private void createEventsFromMainThread() { NYBus.get().post(new ComputationThreadEvent(POSTING_THREAD_MAIN)); NYBus.get().post(new ExecutorThreadEvent(POSTING_THREAD_MAIN)); NYBus.get().post(new IOThreadEvent(POSTING_THREAD_MAIN)); NYBus.get().post(new MainThreadEvent(POSTING_THREAD_MAIN)); NYBus.get().post(new NewThreadEvent(POSTING_THREAD_MAIN)); NYBus.get().post(new PostingThreadEvent(POSTING_THREAD_MAIN)); NYBus.get().post(new TrampolineThreadEvent(POSTING_THREAD_MAIN)); }
private void postOnGivenChannel(String postingThread, String channel) { NYBus.get().post(new ComputationThreadEvent(postingThread), channel); NYBus.get().post(new ExecutorThreadEvent(postingThread), channel); NYBus.get().post(new IOThreadEvent(postingThread), channel); NYBus.get().post(new MainThreadEvent(postingThread), channel); NYBus.get().post(new NewThreadEvent(postingThread), channel); NYBus.get().post(new PostingThreadEvent(postingThread), channel); NYBus.get().post(new TrampolineThreadEvent(postingThread), channel); }
@Override public void run() { try { Thread.sleep(1000); // delay for posting event after 1 sec } catch (InterruptedException e) { e.printStackTrace(); } NYBus.get().post(new ComputationThreadEvent(POSTING_THREAD_BACKGROUND)); NYBus.get().post(new ExecutorThreadEvent(POSTING_THREAD_BACKGROUND)); NYBus.get().post(new IOThreadEvent(POSTING_THREAD_BACKGROUND)); NYBus.get().post(new MainThreadEvent(POSTING_THREAD_BACKGROUND)); NYBus.get().post(new NewThreadEvent(POSTING_THREAD_BACKGROUND)); NYBus.get().post(new PostingThreadEvent(POSTING_THREAD_BACKGROUND)); NYBus.get().post(new TrampolineThreadEvent(POSTING_THREAD_BACKGROUND)); } });