public interface ListensToLogcatMessages extends ExecutesMethod
Modifier and Type | Method and Description |
---|---|
default void |
addLogcatConnectionListener(java.lang.Runnable handler)
Adds a new log broadcasting connection handler.
|
default void |
addLogcatDisconnectionListener(java.lang.Runnable handler)
Adds a new log broadcasting disconnection handler.
|
default void |
addLogcatErrorsListener(java.util.function.Consumer<java.lang.Throwable> handler)
Adds a new log broadcasting errors handler.
|
default void |
addLogcatMessagesListener(java.util.function.Consumer<java.lang.String> handler)
Adds a new log messages broadcasting handler.
|
StringWebSocketClient |
getLogcatClient() |
default void |
removeAllLogcatListeners()
Removes all existing logcat handlers.
|
default void |
startLogcatBroadcast()
Start logcat messages broadcast via web socket.
|
default void |
startLogcatBroadcast(java.lang.String host)
Start logcat messages broadcast via web socket.
|
default void |
startLogcatBroadcast(java.lang.String host,
int port)
Start logcat messages broadcast via web socket.
|
default void |
stopLogcatBroadcast()
Stops logcat messages broadcast via web socket.
|
execute, execute
StringWebSocketClient getLogcatClient()
default void startLogcatBroadcast()
default void startLogcatBroadcast(java.lang.String host)
host
- the name of the host where Appium server is runningdefault void startLogcatBroadcast(java.lang.String host, int port)
host
- the name of the host where Appium server is runningport
- the port of the host where Appium server is runningdefault void addLogcatMessagesListener(java.util.function.Consumer<java.lang.String> handler)
handler
- a function, which accepts a single argument, which is the actual log messagedefault void addLogcatErrorsListener(java.util.function.Consumer<java.lang.Throwable> handler)
handler
- a function, which accepts a single argument, which is the actual exception instancedefault void addLogcatConnectionListener(java.lang.Runnable handler)
handler
- a function, which is executed as soon as the client is successfully
connected to the web socketdefault void addLogcatDisconnectionListener(java.lang.Runnable handler)
handler
- a function, which is executed as soon as the client is successfully
disconnected from the web socketdefault void removeAllLogcatListeners()
default void stopLogcatBroadcast()