Package net.i2p.util

Interface EventDispatcher

    • Method Detail

      • getEventDispatcher

        EventDispatcher getEventDispatcher()
        Get an object to be used to deliver events (usually this, but YMMV).
      • attachEventDispatcher

        void attachEventDispatcher​(EventDispatcher iev)
        Attach an EventDispatcher object to the events dispatching chain. Note that notification is not bidirectional (i.e. events notified to ev won't reach the object calling this method). Good luck, and beware of notification loops! :-)
        iev - Event object to be attached
      • detachEventDispatcher

        void detachEventDispatcher​(EventDispatcher iev)
        Detach the specified EventDispatcher object from the events dispatching chain.
        iev - Event object to be detached
      • notifyEvent

        void notifyEvent​(String event,
                         Object args)
        Deliver an event
        event - name of the event
        args - data being stored for that event
      • getEventValue

        Object getEventValue​(String name)
        Retrieve the value currently associated with the specified event value
        name - name of the event to query for
        value (or null if none are available)
      • getEvents

        Set<String> getEvents()
        Retrieve the names of all the events that have been received
        A set of event names
      • ignoreEvents

        void ignoreEvents()
        Ignore further event notifications
      • unIgnoreEvents

        void unIgnoreEvents()
        Almost like the method above :-)
      • waitEventValue

        Object waitEventValue​(String name)
        Wait until the given event has received a value
        name - name of the event to wait for
        value specified for that event