|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tapestry5.ioc.internal.SingletonServiceLifecycle
public class SingletonServiceLifecycle
The basic implementation of a service lifecycle, which simply uses the ObjectCreator
to create an instance of the service when asked.
Constructor Summary | |
---|---|
SingletonServiceLifecycle()
|
Method Summary | |
---|---|
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). |
boolean |
requiresProxy()
If true, then lifecycle requires a proxy, meaning it is only useable with services that properly define a service interface. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SingletonServiceLifecycle()
Method Detail |
---|
public Object createService(ServiceResources resources, ObjectCreator creator)
ServiceLifecycle
createService
in interface ServiceLifecycle
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.
public boolean isSingleton()
ServiceLifecycle
ScopeConstants.PERTHREAD
scope}. A future version of Tapestry IoC may optimize for the
later case.
isSingleton
in interface ServiceLifecycle
public boolean requiresProxy()
ServiceLifecycle2
ServiceLifecycle
as a ServiceLifecycle2
is to return true.
requiresProxy
in interface ServiceLifecycle2
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |