Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.hivemind.impl.servicemodel
Class AbstractServiceModelImpl  view AbstractServiceModelImpl download AbstractServiceModelImpl.java

java.lang.Object
  extended byorg.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl
All Implemented Interfaces:
org.apache.hivemind.internal.ServiceModel
Direct Known Subclasses:
PooledServiceModel, PrimitiveServiceModel, SingletonServiceModel, ThreadedServiceModel

public abstract class AbstractServiceModelImpl
extends java.lang.Object
implements org.apache.hivemind.internal.ServiceModel

Base class for implementing org.apache.hivemind.internal.ServiceModel.


Field Summary
private  java.lang.Class _bridgeProxyClass
           
protected  org.apache.commons.logging.Log _log
          This log is created from the log's service id, which is the appropriate place to log any messages related to creating (or managing) the service implementation, proxy, etc.
private  org.apache.hivemind.impl.ConstructableServicePoint _servicePoint
           
 
Constructor Summary
AbstractServiceModelImpl(org.apache.hivemind.impl.ConstructableServicePoint servicePoint)
           
 
Method Summary
protected  java.lang.Object addInterceptors(java.lang.Object core)
           
protected  java.lang.Object constructBridgeProxy(java.lang.Object service)
          Need to bridge from the service interface to the actual type.
private  java.lang.Class constructBridgeProxyClass(java.lang.Object service)
          Assumes that the factory will keep cranking out instances of the same class.
protected  java.lang.Object constructCoreServiceImplementation()
          Constructs the core service implementation (by invoking the org.apache.hivemind.internal.ServiceImplementationConstructor), and checks that the result is non-null and assignable to the service interface.
protected  java.lang.Object constructNewServiceImplementation()
          Constructs a new implementation of the service, starting with a core implementation, then adding any interceptors.
protected  java.lang.Object constructServiceImplementation()
          Constructs the service implementation; this is invoked from ServicePoint.getService(Class)>ServicePoint.getService(Class) 55 (for singletons), or from the generated deferrable proxy (for most service models).
 org.apache.hivemind.impl.ConstructableServicePoint getServicePoint()
           
protected  org.apache.hivemind.ShutdownCoordinator getShutdownCoordinatorService()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.hivemind.internal.ServiceModel
getService, instantiateService
 

Field Detail

_log

protected final org.apache.commons.logging.Log _log
This log is created from the log's service id, which is the appropriate place to log any messages related to creating (or managing) the service implementation, proxy, etc. Subclasses should make use of this Log as well.


_servicePoint

private org.apache.hivemind.impl.ConstructableServicePoint _servicePoint

_bridgeProxyClass

private java.lang.Class _bridgeProxyClass
Since:
1.1
Constructor Detail

AbstractServiceModelImpl

public AbstractServiceModelImpl(org.apache.hivemind.impl.ConstructableServicePoint servicePoint)
Method Detail

addInterceptors

protected java.lang.Object addInterceptors(java.lang.Object core)

constructCoreServiceImplementation

protected java.lang.Object constructCoreServiceImplementation()
Constructs the core service implementation (by invoking the org.apache.hivemind.internal.ServiceImplementationConstructor), and checks that the result is non-null and assignable to the service interface.


constructServiceImplementation

protected java.lang.Object constructServiceImplementation()
Constructs the service implementation; this is invoked from ServicePoint.getService(Class)>ServicePoint.getService(Class) 55 (for singletons), or from the generated deferrable proxy (for most service models). Primarily, invokes constructNewServiceImplementation() 55 from within a block that checks for recursive builds.


constructNewServiceImplementation

protected java.lang.Object constructNewServiceImplementation()
Constructs a new implementation of the service, starting with a core implementation, then adding any interceptors.


getServicePoint

public org.apache.hivemind.impl.ConstructableServicePoint getServicePoint()

constructBridgeProxy

protected java.lang.Object constructBridgeProxy(java.lang.Object service)
Need to bridge from the service interface to the actual type.

Since:
1.1

constructBridgeProxyClass

private java.lang.Class constructBridgeProxyClass(java.lang.Object service)
Assumes that the factory will keep cranking out instances of the same class.

Since:
1.1

getShutdownCoordinatorService

protected org.apache.hivemind.ShutdownCoordinator getShutdownCoordinatorService()