public class JustInTimeObjectCreator<T> extends java.lang.Object implements ObjectCreator<T>, EagerLoadServiceProxy, java.lang.Runnable
| Constructor and Description |
|---|
JustInTimeObjectCreator(ServiceActivityTracker tracker,
ObjectCreator<T> creator,
java.lang.String serviceId) |
| Modifier and Type | Method and Description |
|---|---|
T |
createObject()
Checks to see if the proxy has been shutdown, then invokes
ObjectCreator.createObject() if it has not
already done so. |
void |
eagerLoadService()
Invokes
createObject() to force the creation of the underlying service. |
void |
run()
Invoked when the Registry is shutdown; deletes the instantiated object (if it exists) and replaces
the ObjectCreator with one that throws an IllegalStateException.
|
public JustInTimeObjectCreator(ServiceActivityTracker tracker, ObjectCreator<T> creator, java.lang.String serviceId)
public T createObject()
ObjectCreator.createObject() if it has not
already done so.createObject in interface ObjectCreator<T>java.lang.IllegalStateException - if the registry has been shutdownpublic void eagerLoadService()
createObject() to force the creation of the underlying service.eagerLoadService in interface EagerLoadServiceProxypublic void run()
run in interface java.lang.Runnable${project.version} - Copyright © 2003-2015 The Apache Software Foundation.