org.exist.fluent
Class Document.ListenersFacet

java.lang.Object
  extended by org.exist.fluent.Document.ListenersFacet
Enclosing class:
Document

public class Document.ListenersFacet
extends Object

The facet that gives access to a document's listeners.

Author:
Piotr Kaminski

Constructor Summary
Document.ListenersFacet()
           
 
Method Summary
 void add(Set<Trigger> triggers, Document.Listener listener)
          Add a listener for this document.
 void add(Trigger trigger, Document.Listener listener)
          Add a listener for this document.
 void remove(Document.Listener listener)
          Remove a listener previously added through this facet.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Document.ListenersFacet

public Document.ListenersFacet()
Method Detail

add

public void add(Trigger trigger,
                Document.Listener listener)
Add a listener for this document. Equivalent to add(EnumSet.of(trigger), listener).

Parameters:
trigger - the kind of event the listener should be notified of
listener - the listener to notify of events
See Also:
add(Set, Document.Listener)

add

public void add(Set<Trigger> triggers,
                Document.Listener listener)
Add a listener for this document.

Parameters:
triggers - the kinds of events the listener should be notified of; the set must not be empty
listener - the listener to notify of events

remove

public void remove(Document.Listener listener)
Remove a listener previously added through this facet. This will remove the listener from all combinations of timing and action for this document, even if added via multiple invocations of the add methods. However, it will not remove the listener from combinations added through other facets.

Parameters:
listener - the listener to remove


Copyright (C) All rights reserved.