public class Lynx
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
Lynx.Listener |
| Constructor and Description |
|---|
Lynx(Logcat logcat,
MainThread mainThread,
TimeProvider timeProvider) |
| Modifier and Type | Method and Description |
|---|---|
LynxConfig |
getConfig()
Returns a copy of the current LynxConfig object.
|
void |
registerListener(Lynx.Listener lynxPresenter)
Adds a Listener to the listeners collection to be notified with new Trace objects.
|
void |
restart()
Stops the configured Logcat dependency and creates a clone to restart using Logcat and
LogcatListener configured previously.
|
void |
setConfig(LynxConfig lynxConfig)
Indicates a custom LynxConfig object.
|
void |
startReading()
Configures a Logcat.Listener and initialize Logcat dependency to read traces from the OS log.
|
void |
stopReading()
Stops Logcat dependency to stop receiving logcat traces.
|
void |
unregisterListener(Lynx.Listener lynxPresenter)
Removes a Listener to the listeners collection.
|
public Lynx(Logcat logcat, MainThread mainThread, TimeProvider timeProvider)
public void setConfig(LynxConfig lynxConfig)
lynxConfig - a custom LynxConfig objectpublic LynxConfig getConfig()
public void startReading()
public void stopReading()
public void restart()
public void registerListener(Lynx.Listener lynxPresenter)
lynxPresenter - a lynx listenerpublic void unregisterListener(Lynx.Listener lynxPresenter)
lynxPresenter - a lynx listener