public class JNDIProvided<T> extends Object implements ComponentAdapter<T>, Serializable
ComponentAdapter.NOTHING| Constructor and Description |
|---|
JNDIProvided(JNDIObjectReference<T> reference,
Class<T> type)
Create adapter with JNDI reference.
|
JNDIProvided(Object componentKey,
JNDIObjectReference<T> reference,
Class<T> type)
Create adapter with specified key and reference
|
JNDIProvided(String jndiName,
Class<T> type)
Create adapter based on JNDI name.
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(PicoVisitor visitor)
As there is no puprose of proceeding further down,
we do nothing here
|
<U extends ComponentAdapter> |
findAdapterOfType(Class<U> adapterType) |
Class<? extends T> |
getComponentImplementation() |
T |
getComponentInstance(PicoContainer container) |
T |
getComponentInstance(PicoContainer container,
Type into)
Retrieve instance out of JNDI
|
Object |
getComponentKey() |
ComponentAdapter<T> |
getDelegate() |
String |
getDescriptor() |
void |
verify(PicoContainer container)
we have nothing to verify here
|
public JNDIProvided(Object componentKey, JNDIObjectReference<T> reference, Class<T> type)
componentKey - component keyreference - JNDI reference storing componenttype - the type that the JNDIObjectReference will return.public JNDIProvided(JNDIObjectReference<T> reference, Class<T> type)
reference - JNDI reference storing componenttype - the type that the JNDIObjectReference will return.public JNDIProvided(String jndiName, Class<T> type) throws NamingException
jndiName - name to be usedtype - the type that the JNDIObjectReference will return.NamingException - will be thrown if something goes
wrong in JNDIpublic Object getComponentKey()
getComponentKey in interface ComponentAdapter<T>public Class<? extends T> getComponentImplementation()
getComponentImplementation in interface ComponentAdapter<T>public T getComponentInstance(PicoContainer container) throws PicoCompositionException
getComponentInstance in interface ComponentAdapter<T>PicoCompositionExceptionpublic T getComponentInstance(PicoContainer container, Type into) throws PicoCompositionException
getComponentInstance in interface ComponentAdapter<T>PicoCompositionExceptionpublic void verify(PicoContainer container) throws PicoCompositionException
verify in interface ComponentAdapter<T>PicoCompositionExceptionpublic void accept(PicoVisitor visitor)
accept in interface ComponentAdapter<T>public ComponentAdapter<T> getDelegate()
getDelegate in interface ComponentAdapter<T>public <U extends ComponentAdapter> U findAdapterOfType(Class<U> adapterType)
findAdapterOfType in interface ComponentAdapter<T>public String getDescriptor()
getDescriptor in interface ComponentAdapter<T>Copyright © 2003-2014 Codehaus. All Rights Reserved.