org.apache.hivemind.impl.servicemodel
Class PooledServiceModel
java.lang.Object
|
+--org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl
|
+--org.apache.hivemind.impl.servicemodel.PooledServiceModel
- All Implemented Interfaces:
- ServiceModel
- public class PooledServiceModel
- extends AbstractServiceModelImpl
Similar to the threaded service model
,
except that, once created, services are pooled for later use.
- Author:
- Howard Lewis Ship
Field Summary |
protected static java.lang.String |
SERVICE_ACCESSOR_METHOD_NAME
Name of a method in the deferred proxy that is used to obtain
the constructed service. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SERVICE_ACCESSOR_METHOD_NAME
protected static final java.lang.String SERVICE_ACCESSOR_METHOD_NAME
- Name of a method in the deferred proxy that is used to obtain
the constructed service.
- See Also:
- Constant Field Values
PooledServiceModel
public PooledServiceModel(ConstructableServicePoint servicePoint)
getService
public java.lang.Object getService()
- Description copied from interface:
ServiceModel
- Invoked by the service extension point
to obtain the service implementation. The model
may return the actual service implementation or some form of proxy.
This method is only invoked once; the returned value is used
from that point on (in all threads, by all callers). Most models return a proxy
that takes care of realizing the service (actually creating the service, configuring it, and
wrapping it with interceptors) only when needed.
getServiceImplementationForCurrentThread
public java.lang.Object getServiceImplementationForCurrentThread()
instantiateService
public void instantiateService()
- Invokes
getServiceImplementationForCurrentThread()
to instantiate an instance
of the service.