org.jboss.weld.injection.spi.helpers
Class AbstractResourceServices

java.lang.Object
  extended by org.jboss.weld.injection.spi.helpers.AbstractResourceServices
All Implemented Interfaces:
Service, ResourceInjectionServices

public abstract class AbstractResourceServices
extends Object
implements Service, ResourceInjectionServices


Constructor Summary
AbstractResourceServices()
           
 
Method Summary
 void cleanup()
          Called by Weld when it is shutting down, allowing the service to perform any cleanup needed.
protected abstract  Context getContext()
           
static String getPropertyName(Method method)
           
protected  String getResourceName(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
           
protected  String getResourceName(String jndiName, String mappedName)
           
 ResourceReferenceFactory<Object> registerResourceInjectionPoint(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
          Register a resource injection point.
 ResourceReferenceFactory<Object> registerResourceInjectionPoint(String jndiName, String mappedName)
          Register a resource injection point with the given JNDI name and mapped name.
 Object resolveResource(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
          Resolve the value for the given @Resource injection point
 Object resolveResource(String jndiName, String mappedName)
          Resolve the value for the given JNDI name and mapped name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractResourceServices

public AbstractResourceServices()
Method Detail

resolveResource

public Object resolveResource(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
Description copied from interface: ResourceInjectionServices
Resolve the value for the given @Resource injection point

Specified by:
resolveResource in interface ResourceInjectionServices
Parameters:
injectionPoint - the injection point metadata
Returns:
an instance of the resource

resolveResource

public Object resolveResource(String jndiName,
                              String mappedName)
Description copied from interface: ResourceInjectionServices
Resolve the value for the given JNDI name and mapped name

Specified by:
resolveResource in interface ResourceInjectionServices
Returns:
an instance of the resource

getResourceName

protected String getResourceName(String jndiName,
                                 String mappedName)

getContext

protected abstract Context getContext()

getResourceName

protected String getResourceName(javax.enterprise.inject.spi.InjectionPoint injectionPoint)

getPropertyName

public static String getPropertyName(Method method)

registerResourceInjectionPoint

public ResourceReferenceFactory<Object> registerResourceInjectionPoint(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
Description copied from interface: ResourceInjectionServices
Register a resource injection point. The implementation validates the injection point. If the validation passes, an instance of ResourceReferenceFactory is returned which may be used at runtime for creating instances of the resource.

Specified by:
registerResourceInjectionPoint in interface ResourceInjectionServices
Parameters:
injectionPoint - the injection point metadata
Returns:
an instance of the resource

registerResourceInjectionPoint

public ResourceReferenceFactory<Object> registerResourceInjectionPoint(String jndiName,
                                                                       String mappedName)
Description copied from interface: ResourceInjectionServices
Register a resource injection point with the given JNDI name and mapped name. The implementation validates the injection point. If the validation passes, an instance of ResourceReferenceFactory is returned which may be used at runtime for creating instances of the resource.

Specified by:
registerResourceInjectionPoint in interface ResourceInjectionServices
Returns:
an instance of the resource

cleanup

public void cleanup()
Description copied from interface: Service
Called by Weld when it is shutting down, allowing the service to perform any cleanup needed.

Specified by:
cleanup in interface Service


Copyright © 2008-2012 Seam Framework. All Rights Reserved.