Klasse SimpleBeanProvider

java.lang.Object
net.sf.jguiraffe.di.impl.providers.SimpleBeanProvider
Alle implementierten Schnittstellen:
BeanProvider
Bekannte direkte Unterklassen:
CollectionBeanProvider, ConstantBeanProvider, ConstructorBeanProvider, MapBeanProvider, MethodInvocationBeanProvider

public abstract class SimpleBeanProvider extends Object implements BeanProvider

A base class for simple bean providers.

A simple BeanProvider is a bean provider that only cares for creating new bean instances. It does not have further support for life-cycle features. Bean providers of this type are intended to collaborate with a life-cycle-aware bean provider. This provider uses the simple bean provider just for the creation and implements specific initialization functionality.

This base class provides implementations for some of the methods defined in the BeanProvider interface. Especially dummy implementations for the locking methods are available, which are typically not needed by simple providers.

Version:
$Id: SimpleBeanProvider.java 205 2012-01-29 18:29:57Z oheger $
Autor:
Oliver Heger
  • Konstruktordetails

    • SimpleBeanProvider

      public SimpleBeanProvider()
  • Methodendetails

    • getDependencies

      public Set<Dependency> getDependencies()
      Returns the dependencies for this bean provider. This implementation simply returns null. Simple providers often do not have any dependencies.
      Angegeben von:
      getDependencies in Schnittstelle BeanProvider
      Gibt zurück:
      a set with the dependencies of this bean provider
      Siehe auch:
    • getLockID

      public Long getLockID()
      Returns the lock ID of the current transaction. Simple bean providers do not require any lock handling. So this implementation always returns null.
      Angegeben von:
      getLockID in Schnittstelle BeanProvider
      Gibt zurück:
      the lock ID of the current transaction
    • setLockID

      public void setLockID(Long lid)
      Sets the lock ID of the current transaction. This is just a dummy implementation; simple bean providers do not need any lock handling.
      Angegeben von:
      setLockID in Schnittstelle BeanProvider
      Parameter:
      lid - the lock ID of the current transaction
      Siehe auch:
    • isBeanAvailable

      public boolean isBeanAvailable()
      Returns a flag whether the managed bean is available. For simple bean providers this is always the case, so this implementation always returns true.
      Angegeben von:
      isBeanAvailable in Schnittstelle BeanProvider
      Gibt zurück:
      a flag whether the managed bean is available
    • shutdown

      public void shutdown(DependencyProvider depProvider)
      Shuts down this BeanProvider. This implementation is just an empty dummy; a simple bean provider does not need any special shutdown handling.
      Angegeben von:
      shutdown in Schnittstelle BeanProvider
      Parameter:
      depProvider - the DependencyProvider