title: Java developing an app with plugin capabilities
body: <p>I'm currently working on an application in Java that contains a core set of functionality, this has to be extended for several different purposes (~10 different purposes) and as such, the best solution that came to mind was the option to add plugins to expand the functionality when needed as opposed to having a different code base for each.</p>
  
  <p>Is the best way of doing this simply creating an interface and extending that in the relevant plugins?</p>
  
  <pre><code>public coreCode()
  {
      // Core
      doThis();
      doThat();
      // Call plugin code
      plugin.doStuff();
  }
  
  // Plugin
  public interface PluginInterface()
  {
      doStuff();
      ...
  }
  </code></pre>
  
  <p>I've looked into JSF etc but due to work limitations (not spcifically authorized etc), they are sadly not a viable option.</p>
  
  <p><strong>--EDIT--</strong></p>
  
  <p>It should roughly work like this:</p>
  
  <p>purpose A, B and C require a certain set of functionality and so plugin1 is developed for them, bundled with them and then deployed. purpose D and E require a different set so plugin2 is developed for them, bundled and deployed. etc.</p>