|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AdvisorDef
Definition of a service advisor, which (by default) is derived from a service advisor method. Service advisor methods
are static or instance methods on module classes prefixed with "advise". When a service is realized, a list of
matching AdvisorDefs is generated, then ordered, and from each a ServiceAdvisor
is
obtained and invoked.
DecoratorDef
are applied around the
interceptor generated via service advisors, (for compatibility with Tapestry 5.0). In general, you should use service
decoration or service advice, not both.
Method Summary | |
---|---|
ServiceAdvisor |
createAdvisor(ModuleBuilderSource moduleSource,
ServiceResources resources)
Creates an object that can provide the service advice (in the default case, by invoking the advise method on the module class or instance). |
String |
getAdvisorId()
Returns the id of the advisor, which is derived from the advisor method name. |
String[] |
getConstraints()
Returns ordering constraints for this advisor, to order it relative to other advisors. |
boolean |
matches(ServiceDef serviceDef)
Used to determine which services may be advised. |
Method Detail |
---|
String getAdvisorId()
String[] getConstraints()
ServiceAdvisor createAdvisor(ModuleBuilderSource moduleSource, ServiceResources resources)
moduleSource
- used to obtain the module instanceresources
- used to provide injections into the advise method
boolean matches(ServiceDef serviceDef)
ServiceAdvisor
s are
obtained and invoked.
serviceDef
- identifies a service that may be advised
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |