JBoss Modular Service Kernel API 1.0.0.Beta4-SNAPSHOT

org.jboss.msc.inject
Class TranslatingInjector<I,O>

java.lang.Object
  extended by org.jboss.msc.inject.TranslatingInjector<I,O>
Type Parameters:
I - the input type
O - the output type
All Implemented Interfaces:
Injector<I>

public final class TranslatingInjector<I,O>
extends Object
implements Injector<I>

An injector which passes a value through a translator to another injector.

Author:
David M. Lloyd

Constructor Summary
TranslatingInjector(Translator<I,O> translator, Injector<O> injector)
          Construct a new instance.
 
Method Summary
 void inject(I input)
          Inject the given value.
 void uninject()
          Uninject the given value (in other words, cancel or undo a previous injection).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TranslatingInjector

public TranslatingInjector(Translator<I,O> translator,
                           Injector<O> injector)
Construct a new instance.

Parameters:
translator - the translator to use
injector - the injector to pass the result to
Method Detail

inject

public void inject(I input)
Inject the given value.

Specified by:
inject in interface Injector<I>
Parameters:
input - the value

uninject

public void uninject()
Uninject the given value (in other words, cancel or undo a previous injection). Only called after inject() has been called.

Specified by:
uninject in interface Injector<I>

JBoss Modular Service Kernel API 1.0.0.Beta4-SNAPSHOT

Copyright © 2010 JBoss, a division of Red Hat, Inc.