Package io.appium.java_client.proxy
Interface ProxyAwareListener
-
- All Superinterfaces:
MethodCallListener
- All Known Implementing Classes:
ElementAwareWebDriverListener
public interface ProxyAwareListener extends MethodCallListener
Extension ofMethodCallListenerthat allows access to the proxy instance it depends on.This interface is intended for listeners that need a reference to the proxy object.
The
attachProxyInstance(Object)method will be invoked immediately after the proxy is created, allowing the listener to bind to it before any method interception begins.Example usage: Working with elements such as
RemoteWebElementthat require runtime mutation (e.g. setting parent driver or element ID).
-
-
Field Summary
-
Fields inherited from interface io.appium.java_client.proxy.MethodCallListener
UNSET
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidattachProxyInstance(java.lang.Object proxy)Binds the listener to the proxy instance passed.-
Methods inherited from interface io.appium.java_client.proxy.MethodCallListener
afterCall, beforeCall, call, onError
-
-
-
-
Method Detail
-
attachProxyInstance
void attachProxyInstance(java.lang.Object proxy)
Binds the listener to the proxy instance passed.This is called once, immediately after proxy creation and before the proxy is returned to the caller.
- Parameters:
proxy- the proxy instance created viacreateProxythat this listener is attached to.
-
-