org.exist.fluent
Class Folder.DocumentsFacet.ListenersFacet

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

public class Folder.DocumentsFacet.ListenersFacet
extends Object

The facet that gives control over listeners for documents contained directly within a folder.

Author:
Piotr Kaminski

Constructor Summary
Folder.DocumentsFacet.ListenersFacet()
           
 
Method Summary
 void add(Set<Trigger> triggers, Document.Listener listener)
          Add a listener for all documents directly in this folder.
 void add(Trigger trigger, Document.Listener listener)
          Add a listener for all documents directly in this folder.
 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

Folder.DocumentsFacet.ListenersFacet

public Folder.DocumentsFacet.ListenersFacet()
Method Detail

add

public void add(Trigger trigger,
                Document.Listener listener)
Add a listener for all documents directly in this folder. 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 all documents directly in this folder.

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 folder, 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.