public class ModuleImpl extends Object implements Module
| Constructor and Description |
|---|
ModuleImpl(InternalRegistry registry,
ServiceActivityTracker tracker,
ModuleDef moduleDef,
PlasticProxyFactory proxyFactory,
org.slf4j.Logger logger) |
| Modifier and Type | Method and Description |
|---|---|
void |
collectEagerLoadServices(Collection<EagerLoadServiceProxy> proxies)
Locates services with the
EagerLoad annotation and generates proxies
for them, then adds them to the proxies list for instantiation. |
Set<DecoratorDef> |
findMatchingDecoratorDefs(ServiceDef serviceDef)
Iterates over any decorator definitions defined by the module and returns those that apply to the provided
service definition.
|
Set<AdvisorDef> |
findMatchingServiceAdvisors(ServiceDef serviceDef)
Iterates over any advisor definitions defined by the module and returns those that apply to the provided service
definition.
|
Collection<String> |
findServiceIdsForInterface(Class serviceInterface)
Locates the ids of all services that implement the provided service interface, or whose service interface is
assignable to the provided service interface (is a super-class or super-interface).
|
Set<ContributionDef2> |
getContributorDefsForService(ServiceDef serviceDef)
Finds any contributions that are targeted at the indicated service.
|
String |
getLoggerName()
Returns the name used to obtain a logger for the module.
|
Object |
getModuleBuilder()
Returns the instantiated version of the Tapestry IoC module class.
|
<T> T |
getService(String serviceId,
Class<T> serviceInterface)
Locates a service given a service id and the corresponding service interface type.
|
ServiceDef3 |
getServiceDef(String serviceId)
Returns the service definition for the given service id.
|
String |
toString() |
public ModuleImpl(InternalRegistry registry, ServiceActivityTracker tracker, ModuleDef moduleDef, PlasticProxyFactory proxyFactory, org.slf4j.Logger logger)
public <T> T getService(String serviceId, Class<T> serviceInterface)
ModulegetService in interface ModuleserviceId - identifies the service to accessserviceInterface - the interface the service implementspublic Set<DecoratorDef> findMatchingDecoratorDefs(ServiceDef serviceDef)
ModulefindMatchingDecoratorDefs in interface ModuleserviceDef - for which decorators are being assembledpublic Set<AdvisorDef> findMatchingServiceAdvisors(ServiceDef serviceDef)
ModulefindMatchingServiceAdvisors in interface ModuleserviceDef - for which advisors are being assembledpublic Collection<String> findServiceIdsForInterface(Class serviceInterface)
ModulefindServiceIdsForInterface in interface ModuleserviceInterface - the interface to search forpublic void collectEagerLoadServices(Collection<EagerLoadServiceProxy> proxies)
ModuleEagerLoad annotation and generates proxies
for them, then adds them to the proxies list for instantiation.collectEagerLoadServices in interface Moduleproxies - collection of proxies to which any eager load services in the module should be addedpublic Object getModuleBuilder()
ModuleBuilderSourcegetModuleBuilder in interface ModuleBuilderSourcepublic Set<ContributionDef2> getContributorDefsForService(ServiceDef serviceDef)
ModulegetContributorDefsForService in interface Modulepublic ServiceDef3 getServiceDef(String serviceId)
ModulegetServiceDef in interface ModuleserviceId - unique id for the service (caseless)public String getLoggerName()
ModulegetLoggerName in interface Module5.6.4 - Copyright © 2003-2021 The Apache Software Foundation.