org.apache.hivemind.impl.servicemodel
Class ThreadedServiceModel
java.lang.Object
org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl
org.apache.hivemind.impl.servicemodel.ThreadedServiceModel
- All Implemented Interfaces:
- ServiceModel
public final class ThreadedServiceModel
- extends AbstractServiceModelImpl
Like SingletonServiceModel
, this method returns a
proxy (implementing the service interface); unlike SingletonServiceModel, it always
returns the proxy. Invoking a service method on the proxy constructs a service implementation and
binds it to the current thread.
- 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
ThreadedServiceModel
public ThreadedServiceModel(ConstructableServicePoint servicePoint)
getService
public java.lang.Object getService()
- Always returns the service proxy.
getServiceImplementationForCurrentThread
public java.lang.Object getServiceImplementationForCurrentThread()
- Invoked by the proxy to return the active service impl for this thread, constructing it as
necessary.
instantiateService
public void instantiateService()
- Invokes
getServiceImplementationForCurrentThread()
to force the creation of the
service implementation.
Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.