Interface Subject

  • All Known Subinterfaces:
    AsyncExecutor.AsyncListener
    All Known Implementing Classes:
    AsyncListenerImp

    public interface Subject
    Implementation of the Observer pattern.
    This implementation is tailored for the async operation of WebDriver. This interface assumes you are familiar with the observer pattern.
    To learn more about observers visit the wikipedia site The subject is closely coupled with the co.verisoft.selenium.framework.async.Observer class In this framework, the subject is implemented by co.verisoft.selenium.framework.async.AsyncListenerImp
    The interface was designed to be triggered without any data, rather serve as a trigger for async scripts to perform their async operation
    Since:
    2.0.3
    Author:
    Nir Gallner @ www.VeriSoft.co
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void notifyObservers()
      Notify all observers when time is due to execute async Typically, when the implementation uses an ArrayList to keep track of all the observes, this method will loop through the list and activate the update method for each observer
      void register​(Observer o)
      Registers a new observer to be notified.
      void unregister​(Observer o)
      Unregister an existing observer, and stop notifying the observer upon invocation of notifyObservers method
    • Method Detail

      • register

        void register​(Observer o)
        Registers a new observer to be notified. Typically it adds an object which implements the Observer interface to an ArrayList. Once the observer is on the list, each invocation of notify will trigger an update for all observers on the list
        Parameters:
        o - Observer object to be added
      • unregister

        void unregister​(Observer o)
        Unregister an existing observer, and stop notifying the observer upon invocation of notifyObservers method
        Parameters:
        o - Observer object to be removed
      • notifyObservers

        void notifyObservers()
        Notify all observers when time is due to execute async Typically, when the implementation uses an ArrayList to keep track of all the observes, this method will loop through the list and activate the update method for each observer