org.apache.hivemind.service.impl
Class ServiceObjectProvider

java.lang.Object
  extended by org.apache.hivemind.service.impl.ServiceObjectProvider
All Implemented Interfaces:
ObjectProvider

public class ServiceObjectProvider
extends java.lang.Object
implements ObjectProvider

An ObjectProvider that provides access to services. Returns null if the input is null. Deployed with the prefix "service".

Author:
Howard Lewis Ship

Constructor Summary
ServiceObjectProvider()
           
 
Method Summary
 java.lang.Object provideObject(Module contributingModule, java.lang.Class propertyType, java.lang.String locator, Location location)
          Interprets the locator as a service id, and passes it to Module.getService(String, Class).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceObjectProvider

public ServiceObjectProvider()
Method Detail

provideObject

public java.lang.Object provideObject(Module contributingModule,
                                      java.lang.Class propertyType,
                                      java.lang.String locator,
                                      Location location)
Interprets the locator as a service id, and passes it to Module.getService(String, Class).

Specified by:
provideObject in interface ObjectProvider
Parameters:
contributingModule - the module which contributed to the locator
propertyType - the expected type of property
locator - a string that should be meaningful to this provider. It is the suffix of the original input value provided to the translator, after the selector prefix (used to choose a provider) was stripped.
location - the location of the input value (from which the locator was extracted). Used for error reporting, or to set the location of created objects.