|
||||||||||
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-public information about a ServicePoint
, such as its
instance builder and interceptors.
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 ServiceInterceptorContribution s, ordered
according to their dependencies. |
ServiceImplementationConstructor |
getServiceConstructor()
Returns the constructor that can create the core service implementation. |
ShutdownCoordinator |
getShutdownCoordinator()
Returns the ShutdownCoordinator , used by the service model to inform proxies that
the service has shutdown. |
Methods inherited from interface org.apache.hivemind.internal.ServicePoint |
---|
forceServiceInstantiation, getDeclaredInterface, getParametersCount, getParametersSchema, getService, getServiceInterface, getServiceInterfaceClassName |
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 |
---|
ServiceImplementationConstructor getServiceConstructor()
java.util.List getOrderedInterceptorContributions()
ServiceInterceptorContribution
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
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.
void clearConstructorInformation()
ShutdownCoordinator getShutdownCoordinator()
ShutdownCoordinator
, used by the service model to inform proxies that
the service has shutdown.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |