Skip to main content.

FuseJ

{ Unifying Aspects and Components }

Navigation:Home | News | Documentation | Download | FuseJDT | Publications | Team Members | Links

Quick introduction on using the FuseJ Eclipse plugin

Quick introduction on using the FuseJ Eclipse plugin. More information on installing the FuseJ Eclipse plugin can be found here.

Create a new FuseJ Project

  • Locate the FuseJ wizard set and select the FuseJ Project wizard.
  • Define the name of the project, for instance "FuseJTestProject".
  • Press finish.
  • A new FuseJ project is created. It defines a set of pregenerated packages (interfaces, services, component, configurations and deployments) and incorporates the required libraries.

Create the set of provided/required interfaces

  • A FuseJ Component is required to implement a Service Specification. Service Specifications are described in terms of provided and expected interfaces, which are basically Java Interfaces.
  • Define two new interfaces, interfaces.ITest and interfaces.ILog by employing the Java Interface wizard.
  • The interfaces.ITest interface should declare one operation, namely public void test();. The interfaces.ILog interface should declare one operation, namely public void log();.

Create the service specifications

  • A Service Specification is the interface description of a FuseJ Component. It defines the set of operations implementing components should provide to the environment and defines the set of operations implementing component expect to be offered by the same environment.
  • Locate the FuseJ wizard set and select the Service Specification wizard.
  • Define two new service specifications, services.STest and services.SLog.
  • The Service Specification wizard helps at defining these services, by providing a visual interface for defining the provided/expected interfaces and generating a corresponding Service Specification.
  • Use the Service Specification wizard for adding the interface interfaces.ITest as a provided interface for the services.STest service. Click finish.
  • Use the Service Specification wizard for adding the interface interfaces.ILog as a provided interface for the services.SLog service. Click finish.

Create the components

  • A Component needs to implement one Service Specification.
  • Locate the FuseJ wizard set and select the Component wizard.
  • Define two new components, component.CTest and components.CLog.
  • The Component wizard helps at defining components, by providing a visual interface for defining the service specification that it should implements and generating a corresponding component stub implementation.
  • Use the Component wizard for selecting the service services.STest as the implemented service specification of the components.CTest component. Click finish.
  • Provide a default implementation for the CTest.test operation. For instance printing something to the System.out.
  • Use the Component wizard for selecting the service services.SLog as the implemented service specification of the components.CLog component. Click finish.
  • Provide a default implementation for the CLog.log operation. For instance printing something to the System.out.

Create the configurations

  • A Configuration describes how Components need to work together (regular or aspect-oriented).
  • Locate the FuseJ wizard set and select the Configuration wizard.
  • Define one new configuration, configuration.LogConfiguration.
  • The Configuration wizard helps at defining configurations, by providing a visual interface for defining the interactions amongst component operations and generating a corresponding configuration specification.
  • Select the log operation of the components.CLog component as Target operation.
  • Select the test operation of the components.CTest component as Source operation.
  • Select after as interaction type and press finish.
  • Hence, the configuration defines an aspect-oriented interaction. Each time the test operation of the components.CTest component is executed, the log operation of the components.CLog is triggered.

Create the deployments

  • A Deployment deploys Components and Configurations.
  • Locate the FuseJ wizard set and select the Deployment wizard.
  • Define one new Deployment, deployments.Deploy.
  • The Deployment wizard helps at selecting components and configuration to deploy and generating a corresponding deployment specification.
  • Add the deployment of the components.CLog and components.CTest components and the configuration.LogConfiguration configurations. Press Finish.
  • Add the following manually:
       <confineaccesses></confineaccesses>
       <entrypoint componentname="component0" componentoperation="test"></entrypoint>
  • Make sure component0 corresponds with the name of the component instance components.CTest.
  • (The entrypoint corresponds with a main method in a Java class.)

Run the application

  • Create a new FuseJ Application runner.
  • Set the project and the deployment file.
  • Click run.