JAsCo connectors are used to deploy one or more aspect beans upon a concrete application context. For more information about the concepts and syntax of JAsCo connectors, we refer to the JAsCo language reference. The JAsCo connector wizard can generate a complete JAsCo connector automatically based on information provided by the developer.
Create a new package called connector. Add a new connector LoggingConnector by going to File → New → JAsCo Connector.
Add one or more hook instances. Choose the only hook that is currently available, i.e. aspects.LoggingAspect.LoggingHook. Push the add hook button. A new instance is created.
By default, the instantiated hook has the entire application as its context. In this case, we want to limit the context of the hook to the test method of the Application class. Select this method using the add class and add method buttons.
Select hook0 out of the list of hooks and push the add context button. The context of hook0 is changed to reflect the new context. Add one or more hooks in a similar way. When finished, press the next button.
Specify the behavior methods to execute for a particular hook. In this case, only one hook — hook0 — is available and we specify to execute the before method. This is done by selecting hook0 out of the list of hooks, checking the before advice execution option and pushing the add button. In a similar way, other advice executions can be chosen. Note that this wizard also allows to order the hook advice executions in order to define the precedence strategy. Push the next button.
Add one or more combination strategies. More information about this step in the wizard specification proces can be found in Creating a JAsCo Combination Strategy. For now, skip this step. Push the finish button.
The JAsCo connector is now generated and its corresponding editor is opened. The connector is fully specified, no additional user input is required. Your Eclipse environment should now look similar to the one in the following image. Note that the editor automatically colors the JAsCo connector keywords. If a connector is compiled, but the connector contains errors, these are automatically shown in the tasks view.
The application is now fully implemented and can be run using the dedicated JAsCo runners.