|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 ServiceLifecycleresources - 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()
ServiceLifecycleScopeConstants.PERTHREAD scope}. A future version of Tapestry IoC may optimize for the
later case.
isSingleton in interface ServiceLifecyclepublic boolean requiresProxy()
ServiceLifecycle2ServiceLifecycle 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 | |||||||||