com.virtuosotechnologies.lib.plugin
Interface PluginLinker


public interface PluginLinker

An interface that represents a plugin's view of the rest of the world. This object is passed to the methods of PluginInitializer, and can be used to obtain access to other APIs in the system. It will only allow access to those APIs that a plugin declares it wants to use in its PluginInfo.

All implementations must be thread-safe.


Method Summary
 APIProvider getAPI(Class apiClass)
          Get an API provider for the given name
 ObjectSet getAvailableAPIs()
          Get an ObjectSet of the available APIs as APIProvider objects.
 ObjectSet getUsersOfAPI(Class apiClass)
          Get an ObjectSet of ids of plugins currently linked to the given API provided by this plugin.
 

Method Detail

getAPI

public APIProvider getAPI(Class apiClass)
Get an API provider for the given name

Parameters:
apiClass - the requested api class.
Returns:
an APIProvider, or null if no API was found to match the request

getAvailableAPIs

public ObjectSet getAvailableAPIs()
Get an ObjectSet of the available APIs as APIProvider objects. This ObjectSet tracks changes to the set, and clients may register listeners on it to be informed of newly available APIs.

Returns:
an ObjectSet of APIProvider objects

getUsersOfAPI

public ObjectSet getUsersOfAPI(Class apiClass)
Get an ObjectSet of ids of plugins currently linked to the given API provided by this plugin. This ObjectSet tracks changes to the set, and clients may register listeners on it to be informed of usage of their APIs.

Parameters:
apiClass - a class representing an API provided by this plugin.
Returns:
an ObjectSet of PluginID objects, or null if the class is not provided by this plugin.