Search in sources :

Example 1 with ServiceLifecycle

use of org.apache.tapestry5.ioc.ServiceLifecycle in project tapestry-5 by apache.

the class RegistryImpl method getServiceLifecycle.

@Override
public ServiceLifecycle2 getServiceLifecycle(String scope) {
    lock.check();
    ServiceLifecycle result = lifecycles.get(scope);
    if (result == null) {
        ServiceLifecycleSource source = getService("ServiceLifecycleSource", ServiceLifecycleSource.class);
        result = source.get(scope);
    }
    if (result == null)
        throw new RuntimeException(IOCMessages.unknownScope(scope));
    return InternalUtils.toServiceLifecycle2(result);
}
Also used : ServiceLifecycleSource(org.apache.tapestry5.ioc.services.ServiceLifecycleSource) ServiceLifecycle(org.apache.tapestry5.ioc.ServiceLifecycle)

Aggregations

ServiceLifecycle (org.apache.tapestry5.ioc.ServiceLifecycle)1 ServiceLifecycleSource (org.apache.tapestry5.ioc.services.ServiceLifecycleSource)1