public interface ServicesFactory
| Modifier and Type | Method and Description |
|---|---|
<T> T |
getInstance(Class<T> type)
Get service instance associated with given type, usually service interface or base abstract class. |
void |
release()
Release all services. |
<T> void |
setInstance(Class<T> type,
T instance)
Associate concrete instance with service. |
<T> T getInstance(Class<T> type) throws ServiceException
Get service instance associated with given type, usually service interface or base abstract class.
T - service type.type - Base class implemented by service.ServiceException - if factory cannot create requested service.<T> void setInstance(Class<T> type, T instance)
Associate concrete instance with service.
T - service type.type - Base class implemented by service.instance - service instance.void release()
Release all services.
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.