Example - a custom protocol plugin

 
  1. Write the handler class for your protocol (implement the java.net.URLStreamHandler interface)

    [Note]Note

    You must be careful to provide ways to correct and un correct the URLs of your files.

  2. Write the plugin class (the ro.sync.exml.plugin.Plugin class must be extended in order to create the new plugin)

  3. Write the plugin extension class. It is necessary that the plugin extension for the custom protocol implements the URLStreamHandlerPluginExtension interface. Without it, you can’t use your plugin,because <oXygen/> will not be able to find the protocol handler.

    You can choose to implement also the URLChooserPluginExtension interface. It will allow you to write and use your own customized dialog for this protocol.

  4. Write the plugin.xml file (remember to change the name of the plugin class to the one from the second step and the plugin extension class name with the one you have chosen at step 3)

  5. Create a .jar archive and install your new plugin.