Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.picocontainer.gems.jndi
Class JNDIProvided<T>

    java.lang.Object
      org.picocontainer.gems.jndi.JNDIProvided<T>

All Implemented Interfaces:
  Serializable, org.picocontainer.ComponentAdapter<T>

    public class JNDIProvided<T>

extends Object
implements org.picocontainer.ComponentAdapter<T>, Serializable

represents dependency provided via JNDI. This dependency is not to be managed by container at all, so there is no lifecycle, no monitoring etc.

Author:
  Konstantin Pribluda
See Also:
  Serialized Form

Nested Class Summary

Nested classes/interfaces inherited from interface org.picocontainer.ComponentAdapter
`org.picocontainer.ComponentAdapter.NOTHING`

Constructor Summary
`JNDIProvided(JNDIObjectReference<T> reference)` create adapter with JNDI reference.
`JNDIProvided(Object componentKey, JNDIObjectReference<T> reference)` create adapter with specified key and reference
`JNDIProvided(String jndiName)` create adapter based on JNDI name.

Method Summary
`void` | `accept(org.picocontainer.PicoVisitor visitor)` as there is no puprose of proceeding further down, we do nothing here
`
`<U extends org.picocontainer.ComponentAdapter> U`
` | `findAdapterOfType(Class<U> componentAdapterType)`
`Class` | `getComponentImplementation()`
`T` | `getComponentInstance(org.picocontainer.PicoContainer container)`
`T` | `getComponentInstance(org.picocontainer.PicoContainer container, Type into)` retrieve instance out of JNDI
`Object` | `getComponentKey()`
`org.picocontainer.ComponentAdapter<T>` | `getDelegate()`
`String` | `getDescriptor()`
`void` | `verify(org.picocontainer.PicoContainer container)` we have nothing to verify here

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### JNDIProvided

    public JNDIProvided(Object componentKey,
                        JNDIObjectReference<T> reference)

  create adapter with specified key and reference

  Parameters:
    `componentKey` - component key
    `reference` - JNDI reference storing component

### JNDIProvided

    public JNDIProvided(JNDIObjectReference<T> reference)

  create adapter with JNDI reference. referenced object class will be takes as key

  Parameters:
    `reference` - JNDI reference storing component

### JNDIProvided

    public JNDIProvided(String jndiName)
                 throws NamingException

  create adapter based on JNDI name. I leave this unchecked because type is really not known at this time

  Parameters:
    `jndiName` - name to be used
  Throws:
    `NamingException` - will be thrown if something goes wrong in JNDI

Method Detail

### getComponentKey

    public Object getComponentKey()

  Specified by:
    `getComponentKey` in interface `org.picocontainer.ComponentAdapter<T>`

### getComponentImplementation

    public Class getComponentImplementation()

  Specified by:
    `getComponentImplementation` in interface `org.picocontainer.ComponentAdapter<T>`

### getComponentInstance

    public T getComponentInstance(org.picocontainer.PicoContainer container)
                           throws org.picocontainer.PicoCompositionException

  Specified by:
    `getComponentInstance` in interface `org.picocontainer.ComponentAdapter<T>`
  Throws:
    `org.picocontainer.PicoCompositionException`

### getComponentInstance

    public T getComponentInstance(org.picocontainer.PicoContainer container,
                                  Type into)
                           throws org.picocontainer.PicoCompositionException

  retrieve instance out of JNDI

  Specified by:
    `getComponentInstance` in interface `org.picocontainer.ComponentAdapter<T>`
  Throws:
    `org.picocontainer.PicoCompositionException`

### verify

    public void verify(org.picocontainer.PicoContainer container)
                throws org.picocontainer.PicoCompositionException

  we have nothing to verify here

  Specified by:
    `verify` in interface `org.picocontainer.ComponentAdapter<T>`
  Throws:
    `org.picocontainer.PicoCompositionException`

### accept

    public void accept(org.picocontainer.PicoVisitor visitor)

  as there is no puprose of proceeding further down, we do nothing here

  Specified by:
    `accept` in interface `org.picocontainer.ComponentAdapter<T>`

### getDelegate

    public org.picocontainer.ComponentAdapter<T> getDelegate()

  Specified by:
    `getDelegate` in interface `org.picocontainer.ComponentAdapter<T>`

### findAdapterOfType

    public <U extends org.picocontainer.ComponentAdapter> U findAdapterOfType(Class<U> componentAdapterType)

  Specified by:
    `findAdapterOfType` in interface `org.picocontainer.ComponentAdapter<T>`

### getDescriptor

    public String getDescriptor()

  Specified by:
    `getDescriptor` in interface `org.picocontainer.ComponentAdapter<T>`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2009 Codehaus. All Rights Reserved.