org.apache.tapestry5.ioc.internal.services
Class PerThreadServiceCreator

java.lang.Object
  extended by org.apache.tapestry5.ioc.internal.services.PerThreadServiceCreator
All Implemented Interfaces:
ObjectCreator

public class PerThreadServiceCreator
extends Object
implements ObjectCreator

Provides per-thread implementations of services.


Constructor Summary
PerThreadServiceCreator(PerthreadManager perthreadManager, ObjectCreator delegate)
           
 
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
 

Constructor Detail

PerThreadServiceCreator

public PerThreadServiceCreator(PerthreadManager perthreadManager,
                               ObjectCreator delegate)
Method Detail

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.