Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

This is a method that is placed in a module class. Note the terminology: advise is the verb ("to advise a method") and advice is the noun ("with this advice"). The MethodAdviceReceiver is a wrapper around the service being advised: you can add advice to some or all methods of the service, and also obtain the interface of the service. It is automatically passed into service advisor methods.

See Service Advisors See Injection in Detail for what can be injected into a service advisor method.

...

Service advisor methods are always void methods (this is different from service decorator methods).

The @Match("*") annotation indicates that this advice applies to all services (both your own, and those defined by Tapestry). You will want to narrow down which services are actually targeted in most cases.

...

The advice above is applied to any implementation of the MyService interface that is marked by the @Blue annotation.

Decorators and Advice

Service decorators are another way to achieve the same thing; service advisors are a more recent addition, added in Tapestry 5.1.

...