Create a Custom Mediator¶ A custom mediator is a Class mediator that you can create to implement custom mediation logic. It is a Java class that extends the org.apache.synapse.mediators.AbstractMediator class. You can add a custom mediator to your integration project using the WSO2 Integrator: MI Visual Studio Code extension. Instructions¶ Create a custom mediator artifact¶ Follow the steps below to create a custom mediator artifact: Create a new integration project or select an existing one. Navigate to MI Project Explorer and click on Add artifact. Click + View More under Create an Integration. Select Class Mediator under Other Artifacts to open the ClassMediator Creation Form. Enter the package name and class name of your mediator project. Click Create and see that the project is now listed in the project explorer. A new mediator class that extends org.apache.synapse.mediators.AbstractMediator is now added to the integration project. You can now add your custom mediation logic to this class. Info A URL classloader is used to load classes in the mediator (class mediators are not deployed as OSGi bundles). Therefore, it is only possible to refer to the class mediator from artifacts packed in the same CAR file. Accessing the class mediator from an artifact in a different CAR file is not possible. However, you can refer to the class mediator from a sequence packed in the same CAR file and call that sequence from any other artifact packed in other CAR files.