textbender.g.beans.beancontext
Class SimpleServiceProvider

java.lang.Object
  extended by SimpleServiceProvider
All Implemented Interfaces:
BeanContextServiceProvider

public final class SimpleServiceProvider
extends Object
implements BeanContextServiceProvider

A service provider that holds a single instance of an irrevocable service, which it provides to all requesting clients.


Constructor Summary
SimpleServiceProvider(Object iS)
          Creates a SimpleServiceProvider.
 
Method Summary
 Iterator getCurrentServiceSelectors(BeanContextServices bcs, Class serviceClass)
           
 Object getService(BeanContextServices bCS, Object requestor, Class serviceClass, Object serviceSelector)
           
 void releaseService(BeanContextServices bCS, Object requestor, Object service)
          Does nothing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleServiceProvider

public SimpleServiceProvider(Object iS)
Creates a SimpleServiceProvider.

Parameters:
iS - single service instance to provide
Method Detail

getCurrentServiceSelectors

public Iterator getCurrentServiceSelectors(BeanContextServices bcs,
                                           Class serviceClass)
Specified by:
getCurrentServiceSelectors in interface BeanContextServiceProvider
Returns:
an empty iterator

getService

public Object getService(BeanContextServices bCS,
                         Object requestor,
                         Class serviceClass,
                         Object serviceSelector)
Specified by:
getService in interface BeanContextServiceProvider
Returns:
the single service instance

releaseService

public void releaseService(BeanContextServices bCS,
                           Object requestor,
                           Object service)
Does nothing.

Specified by:
releaseService in interface BeanContextServiceProvider