public interface ServiceLifecycle
Modifier and Type | Method and Description |
---|---|
Object |
createService(ServiceResources resources,
ObjectCreator creator)
Returns the same creator, or a new one, that encapsulates the creation of the core service implementation.
|
boolean |
isSingleton()
Returns true if the lifecycle is a singleton (a service that will only be created once).
|
Object createService(ServiceResources resources, ObjectCreator creator)
resources
- source of information about the service to be created, and source of additional services or
other resources that may be needed when constructing the core service implementationcreator
- object capable of creating the service implementation on demand. This is a wrapper around the
service's builder method.boolean isSingleton()
ScopeConstants.PERTHREAD
scope}. A future version of Tapestry IoC may optimize for the
later case.5.6.3 - Copyright © 2003-2021 The Apache Software Foundation.