Class WorkspaceExternalPluginHandler

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public class WorkspaceExternalPluginHandler
    extends java.lang.Object
    implements java.lang.AutoCloseable
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T,​R>
      aQute.bnd.result.Result<R>
      call​(java.lang.String pluginName, java.lang.Class<T> c, aQute.bnd.exceptions.FunctionWithException<T,​aQute.bnd.result.Result<R>> f)  
      aQute.bnd.result.Result<java.lang.Integer> call​(java.lang.String mainClass, org.osgi.framework.VersionRange range, Processor context, java.util.Map<java.lang.String,​java.lang.String> attrs, java.util.List<java.lang.String> args, java.io.InputStream stdin, java.io.OutputStream stdout, java.io.OutputStream stderr)  
      void close()  
      <T> aQute.bnd.result.Result<java.util.List<T>> getImplementations​(java.lang.Class<T> interf, Attrs attrs)
      Returns list of external plugin proxies that implement the given interface.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • call

        public <T,​R> aQute.bnd.result.Result<R> call​(java.lang.String pluginName,
                                                           java.lang.Class<T> c,
                                                           aQute.bnd.exceptions.FunctionWithException<T,​aQute.bnd.result.Result<R>> f)
      • call

        public aQute.bnd.result.Result<java.lang.Integer> call​(java.lang.String mainClass,
                                                               org.osgi.framework.VersionRange range,
                                                               Processor context,
                                                               java.util.Map<java.lang.String,​java.lang.String> attrs,
                                                               java.util.List<java.lang.String> args,
                                                               java.io.InputStream stdin,
                                                               java.io.OutputStream stdout,
                                                               java.io.OutputStream stderr)
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
      • getImplementations

        public <T> aQute.bnd.result.Result<java.util.List<T>> getImplementations​(java.lang.Class<T> interf,
                                                                                 Attrs attrs)
        Returns list of external plugin proxies that implement the given interface. The proxies will load the actual plugin on demand when used. That is, the plugins will be quite cheap unless used.
        Parameters:
        interf - the interface listed in `-plugin`.
        attrs - the attributes from the that interface, the name specifies the name of the plugin, wildcards allowed
        Returns:
        a list of plugins loaded from the external plugin set