org.jvnet.hk2.config
Class Transactions.ListenerNotifier<T,U,V>

java.lang.Object
  extended by org.jvnet.hk2.config.Transactions.ListenerNotifier<T,U,V>
Type Parameters:
T - type of listener interface
U - type of events the listener methods are expecting
V - return type of the listener interface methods.
Enclosing class:
Transactions

public class Transactions.ListenerNotifier<T,U,V>
extends java.lang.Object

Default listener notification pump. One thread per listener, jobs processed in the order it was received.


Constructor Summary
Transactions.ListenerNotifier(T listener)
           
 
Method Summary
protected  java.util.concurrent.FutureTask<V> prepare(org.jvnet.hk2.config.Transactions.Job<T,U,V> job)
          Creates the task that will notify the listeners of a particular job.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Transactions.ListenerNotifier

public Transactions.ListenerNotifier(T listener)
Method Detail

prepare

protected java.util.concurrent.FutureTask<V> prepare(org.jvnet.hk2.config.Transactions.Job<T,U,V> job)
Creates the task that will notify the listeners of a particular job.

Parameters:
job - contains the specifics of the notification like the events that need to be notified.
Returns:
a task that can be run and return an optional value.


Copyright © 2010 Sun Microsystems, Inc.. All Rights Reserved.