public static interface BackgroundExecutor.WrongThreadListener
Modifier and Type | Method and Description |
---|---|
void |
onBgExpected(String... expectedSerials)
Will be called, if the method is supposed to be called from a
background thread, but was called from the UI-thread.
|
void |
onUiExpected()
Will be called, if the method is supposed to be called from the
UI-thread, but was called from a background thread.
|
void |
onWrongBgSerial(String currentSerial,
String... expectedSerials)
Will be called, if the method is supposed to be called from a
background thread with one of
expectedSerials , but was called
from a currentSerial . |
void onUiExpected()
void onBgExpected(String... expectedSerials)
expectedSerials
- a list of allowed serials. If any background thread is
allowed the list will be empty.SupposeBackground
,
BackgroundExecutor.setWrongThreadListener(WrongThreadListener)
,
BackgroundExecutor.DEFAULT_WRONG_THREAD_LISTENER
void onWrongBgSerial(String currentSerial, String... expectedSerials)
expectedSerials
, but was called
from a currentSerial
. currentSerial
will be null, if
it is called from a background thread without a serial.currentSerial
- the serial of caller thread or null if there is no serialexpectedSerials
- a list of allowed serialsSupposeBackground
,
BackgroundExecutor.setWrongThreadListener(WrongThreadListener)
,
BackgroundExecutor.DEFAULT_WRONG_THREAD_LISTENER
Copyright © 2010-2015. All Rights Reserved.