org.exist.storage
Class NotificationService

java.lang.Object
  extended byjava.util.AbstractMap
      extended byjava.util.IdentityHashMap
          extended byorg.exist.storage.NotificationService
All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, java.io.Serializable

public class NotificationService
extends java.util.IdentityHashMap

Global notification service for document updates. Other classes can subscribe to this service to be notified of document modifications, removals or additions.

Author:
wolf
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.util.Map
java.util.Map.Entry
 
Constructor Summary
NotificationService()
           
 
Method Summary
 void debug()
           
 void notifyUpdate(DocumentImpl document, int event)
          Notify all subscribers that a document has been updated/removed or a new document has been added.
 void subscribe(UpdateListener listener)
          Subscribe an UpdateListener to receive notifications.
 void unsubscribe(UpdateListener listener)
          Unsubscribe an UpdateListener.
 
Methods inherited from class java.util.IdentityHashMap
clear, clone, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NotificationService

public NotificationService()
Method Detail

subscribe

public void subscribe(UpdateListener listener)
Subscribe an UpdateListener to receive notifications.

Parameters:
listener -

unsubscribe

public void unsubscribe(UpdateListener listener)
Unsubscribe an UpdateListener.

Parameters:
listener -

notifyUpdate

public void notifyUpdate(DocumentImpl document,
                         int event)
Notify all subscribers that a document has been updated/removed or a new document has been added.

Parameters:
document -
event -

debug

public void debug()


Copyright (C) Wolfgang Meier. All rights reserved.