org.sonatype.guice.bean.locators
Class NamedMediatorAdapter<T,W>

java.lang.Object
  extended by org.sonatype.guice.bean.locators.NamedMediatorAdapter<T,W>
All Implemented Interfaces:
Mediator<com.google.inject.name.Named,T,W>

public final class NamedMediatorAdapter<T,W>
extends java.lang.Object
implements Mediator<com.google.inject.name.Named,T,W>

Delegating Mediator that automatically unwraps Named values.


Constructor Summary
NamedMediatorAdapter(Mediator<java.lang.String,T,W> delegate)
           
 
Method Summary
 void add(com.google.inject.name.Named qualifier, javax.inject.Provider<T> bean, W watcher)
          Notifies the associated watcher that a qualified bean has been added.
 void remove(com.google.inject.name.Named qualifier, javax.inject.Provider<T> bean, W watcher)
          Notifies the associated watcher that a qualified bean has been removed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamedMediatorAdapter

public NamedMediatorAdapter(Mediator<java.lang.String,T,W> delegate)
Method Detail

add

public void add(com.google.inject.name.Named qualifier,
                javax.inject.Provider<T> bean,
                W watcher)
         throws java.lang.Exception
Description copied from interface: Mediator
Notifies the associated watcher that a qualified bean has been added.

Specified by:
add in interface Mediator<com.google.inject.name.Named,T,W>
Parameters:
qualifier - The bean qualifier
bean - The bean provider
watcher - The associated watcher
Throws:
java.lang.Exception

remove

public void remove(com.google.inject.name.Named qualifier,
                   javax.inject.Provider<T> bean,
                   W watcher)
            throws java.lang.Exception
Description copied from interface: Mediator
Notifies the associated watcher that a qualified bean has been removed.

Specified by:
remove in interface Mediator<com.google.inject.name.Named,T,W>
Parameters:
qualifier - The bean qualifier
bean - The bean provider
watcher - The associated watcher
Throws:
java.lang.Exception


Copyright © 2010-2011 Sonatype, Inc.. All Rights Reserved.