public abstract class ServiceReferenceObjectFactory extends Object implements ServiceAwareObjectFactory
ServiceReferenceObjectFactory can get access to the value of the service described by the reference.
If the factory state is no ServiceController.State.UP then the factory will block. If the state is ServiceController.State.START_FAILED or
ServiceController.State.REMOVED (or the state transactions to one of these states while blocking) an exception is thrown.| Constructor and Description |
|---|
ServiceReferenceObjectFactory() |
| Modifier and Type | Method and Description |
|---|---|
static Reference |
createReference(org.jboss.msc.service.ServiceName service,
Class<? extends ServiceReferenceObjectFactory> factory)
Create a reference to a sub class of
ServiceReferenceObjectFactory that injects the value of the given service. |
Object |
getObjectInstance(Object obj,
Name name,
Context nameCtx,
Hashtable<?,?> environment) |
abstract Object |
getObjectInstance(Object serviceValue,
Object obj,
Name name,
Context nameCtx,
Hashtable<?,?> environment)
Handles the service reference.
|
void |
injectServiceRegistry(org.jboss.msc.service.ServiceRegistry registry) |
public static Reference createReference(org.jboss.msc.service.ServiceName service, Class<? extends ServiceReferenceObjectFactory> factory)
ServiceReferenceObjectFactory that injects the value of the given service.public void injectServiceRegistry(org.jboss.msc.service.ServiceRegistry registry)
injectServiceRegistry in interface ServiceAwareObjectFactorypublic final Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?,?> environment) throws Exception
getObjectInstance in interface ObjectFactoryExceptionpublic abstract Object getObjectInstance(Object serviceValue, Object obj, Name name, Context nameCtx, Hashtable<?,?> environment) throws Exception
ObjectFactory.getObjectInstance(Object, Name, Context, Hashtable), but with the addition of the service value as
the first parameter.ExceptionCopyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.