org.apache.hivemind.impl
Interface ConstructableServicePoint

All Superinterfaces:
ExtensionPoint, Locatable, ServicePoint
All Known Implementing Classes:
ServicePointImpl

public interface ConstructableServicePoint
extends ServicePoint

"Private" interface used by a org.apache.hivemind.ServiceModel to access non-public information about a ConstructableServicePoint, such as its instance builder and interceptors.

Author:
Howard Lewis Ship

Method Summary
 void clearConstructorInformation()
          Invoked by the ServiceModel when constuction information (the builder and interceptors) is no longer needed.
 java.util.List getOrderedInterceptorContributions()
          Returns a list of org.apache.hivemind.ServiceInterceptorContributions, ordered according to their dependencies.
 ServiceImplementationConstructor getServiceConstructor()
          Returns the constructor that can create the core service implementation.
 ShutdownCoordinator getShutdownCoordinator()
          Returns the ShutdownCooordinator, used by the service model to inform proxies that the service has shutdown.
 
Methods inherited from interface org.apache.hivemind.internal.ServicePoint
forceServiceInstantiation, getParametersSchema, getService, getServiceInterface, getServiceLog
 
Methods inherited from interface org.apache.hivemind.internal.ExtensionPoint
getExtensionPointId, getModule
 
Methods inherited from interface org.apache.hivemind.Locatable
getLocation
 

Method Detail

getServiceConstructor

public ServiceImplementationConstructor getServiceConstructor()
Returns the constructor that can create the core service implementation.


getOrderedInterceptorContributions

public java.util.List getOrderedInterceptorContributions()
Returns a list of org.apache.hivemind.ServiceInterceptorContributions, ordered according to their dependencies. May return null or an empty list.

Note that the order is tricky! To keep any error messages while ordering the interceptors understandable, they are ordered according into runtime execution order. Example: If we want a logging interceptor to operate before a security-check interceptor, we'll write the following in the descriptor:

   <interceptor service-id="hivemind.LoggingInterceptor" before="*"/>
   <interceptor service-id="somepackage.SecurityInterceptor"/>
 
The before value for the first interceptor contribution will be assigned to the contribution's followingInterceptorIds property, because all other interceptors (including the security interceptor) should have their behavior follow the logging interceptor.

To get this behavior, the logging interceptor will delegate to the security interceptor, and the security interceptor will delegate to the core service implementation.

The trick is that interceptors are applied in reverse order: we start with core service implementation, wrap it with the security interceptor, then wrap that with the logging interceptor ... but that's an issue that applies when building the interceptor stack around the core service implementation.


clearConstructorInformation

public void clearConstructorInformation()
Invoked by the ServiceModel when constuction information (the builder and interceptors) is no longer needed.


getShutdownCoordinator

public ShutdownCoordinator getShutdownCoordinator()
Returns the ShutdownCooordinator, used by the service model to inform proxies that the service has shutdown.