org.openqa.grid.internal.listeners
Interface SelfHealingProxy

All Known Implementing Classes:
DefaultRemoteProxy, SeleniumRemoteProxy, WebDriverRemoteProxy

public interface SelfHealingProxy

Defines of how the proxy tries to mitigate system errors like network issues etc. When a proxy implements this interface, the polling will start when the proxy is fully registered to the Registry, ie after the Registration.beforeRegistration() is done.


Method Summary
 void addNewEvent(RemoteException event)
          Allow to record when something important about the remote state is detected.
 void onEvent(java.util.List<RemoteException> events, RemoteException lastInserted)
          Allow to process the list of all the events that were detected on this Remote so far.
 void startPolling()
          start/restart the polling for the remote proxy.
 void stopPolling()
          put the polling on hold.
 

Method Detail

startPolling

void startPolling()
start/restart the polling for the remote proxy. A typical poll will try to contact the remote proxy to see if it's still accessible, but it can have more logic in it, like checking the resource usage ( RAM etc) on the remote.


stopPolling

void stopPolling()
put the polling on hold.


addNewEvent

void addNewEvent(RemoteException event)
Allow to record when something important about the remote state is detected.

Parameters:
event -

onEvent

void onEvent(java.util.List<RemoteException> events,
             RemoteException lastInserted)
Allow to process the list of all the events that were detected on this Remote so far. A typical implementation of this method will be to put the proxy on hold if the network connection is bad, or to restart the remote if the resources used are too important

Parameters:
event -


Copyright © 2011. All Rights Reserved.