com.jrockit.memleak.mlp
Class NotificationService<K>

java.lang.Object
  extended by com.jrockit.memleak.mlp.NotificationService<K>
Type Parameters:
K - the key on which tokens can be added
All Implemented Interfaces:
INotificationService

public class NotificationService<K>
extends java.lang.Object
implements INotificationService

Author:
mpersson

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.jrockit.memleak.INotificationService
INotificationService.IListener
 
Constructor Summary
NotificationService(java.util.concurrent.BlockingQueue<K> queue)
           
 
Method Summary
 void addListener(INotificationService.IListener listener)
           
 void addToken(K key, java.lang.Object token)
           
protected  void fireChanges(java.util.Set<java.lang.Object> tokenSet)
           
 void removeListener(INotificationService.IListener listener)
           
 void shutdown()
          Shutdowns the notification service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NotificationService

public NotificationService(java.util.concurrent.BlockingQueue<K> queue)
Parameters:
queue -
Method Detail

addListener

public void addListener(INotificationService.IListener listener)
Specified by:
addListener in interface INotificationService

removeListener

public void removeListener(INotificationService.IListener listener)
Specified by:
removeListener in interface INotificationService

fireChanges

protected void fireChanges(java.util.Set<java.lang.Object> tokenSet)
Parameters:
tokenSet -

addToken

public void addToken(K key,
                     java.lang.Object token)
Parameters:
key -
token -

shutdown

public void shutdown()
Shutdowns the notification service.



Copyright © 1999, 2011, Oracle and/or its affiliates. All rights reserved.