|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ConstructableServicePoint
"Private" interface used by a ServiceModel
s to access non-
information about a ServicePoint
, such as its instance
builder and interceptors.
Method Summary | |
---|---|
void |
addRegistryShutdownListener(RegistryShutdownListener listener)
Adds a shutdown listener; HiveMind uses two coordinators; the first is the hivemind.ShutdownCoordinator service, which is the coordinator used for service implementations. |
void |
clearConstructorInformation()
Invoked by the ServiceModel when constuction information (the builder and interceptors) is no longer needed. |
ImplementationDefinition |
getImplementationDefinition()
|
java.util.List |
getOrderedInterceptorContributions()
Returns a list of InterceptorConstructor s,
ordered according to their dependencies. |
ImplementationConstructor |
getServiceConstructor()
Returns the constructor that can create the core service implementation. |
Methods inherited from interface org.apache.hivemind.internal.ServicePoint |
---|
forceServiceInstantiation, getDeclaredInterface, getService, getServiceInterface, getServiceInterfaceClassName, getServicePointDefinition |
Methods inherited from interface org.apache.hivemind.internal.ExtensionPoint |
---|
getErrorLog, getExtensionPointId, getLog, getModule, visibleToModule |
Methods inherited from interface org.apache.hivemind.Locatable |
---|
getLocation |
Method Detail |
---|
ImplementationConstructor getServiceConstructor()
ImplementationDefinition getImplementationDefinition()
java.util.List getOrderedInterceptorContributions()
InterceptorConstructor
s,
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
followingNames
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.
void clearConstructorInformation()
void addRegistryShutdownListener(RegistryShutdownListener listener)
listener
- the listener to be added to the infrastructure's shutdown coordinator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |