create changelog entry
[debian/openrocket] / core / src / net / sf / openrocket / plugin / framework / Service.java
1 package net.sf.openrocket.plugin.framework;
2
3 import java.util.List;
4
5 import net.xeoh.plugins.base.Plugin;
6
7 /**
8  * A discovery service that returns plugins of a specified type with
9  * provided arguments.
10  * 
11  * @author Sampo Niskanen <sampo.niskanen@iki.fi>
12  */
13 public interface Service extends Plugin {
14         
15         /**
16          * Return the plugins that match the provided type and are applicable
17          * for the arguments.  The arguments depend on the class type.
18          * <p>
19          * This method may return different plugins for different arguments.
20          * For example, if the arguments contain the OpenRocketDocument, the
21          * service may return only plugins applicable for the specified document.
22          * 
23          * @param type  the plugin interface type
24          * @param args  arguments for the interface.
25          * @return              the plugin instances applicable.
26          */
27         public <E> List<E> getPlugins(Class<E> type, Object... args);
28         
29         
30 }