org.apache.tapestry5.ioc.internal.services
Class PerThreadServiceCreator
java.lang.Object
org.apache.tapestry5.ioc.internal.services.PerThreadServiceCreator
- All Implemented Interfaces:
- ObjectCreator
public class PerThreadServiceCreator
- extends Object
- implements ObjectCreator
Provides per-thread implementations of services.
Method Summary |
Object |
createObject()
For each thread, the first call will use the delegate ObjectCreator to create
an instance, and later calls will reuse the same per-thread instance. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PerThreadServiceCreator
public PerThreadServiceCreator(PerthreadManager perthreadManager,
ObjectCreator delegate)
createObject
public Object createObject()
- For each thread, the first call will use the delegate
ObjectCreator
to create
an instance, and later calls will reuse the same per-thread instance. The instance is stored in the
PerthreadManager
and will be released at the end of the request.
- Specified by:
createObject
in interface ObjectCreator
Copyright © 2003-2012 The Apache Software Foundation.