edu.uci.isr.yancees.plugin
Interface MOPluginInterface

All Superinterfaces:
MOPluginListenerInterface, PluginInterface
All Known Subinterfaces:
MOSharedPluginInterface
All Known Implementing Classes:
AbstractMOPlugin

public interface MOPluginInterface
extends PluginInterface, MOPluginListenerInterface

This is the interface of the plug-ins of the core of the system. A plug-in is a listener of the events generated by other plug-ins.


Method Summary
 void addListener(MOPluginListenerInterface plugin)
          Makes this plug-in notify another provided plugin whenever it computers its output The output here is data (events) obtained as a result of a subscription
 void addRequiredPlugin(MOPluginInterface plugin)
          This method is used by the subscription parser to inform the plugin of all the IDs of the plug-ins that are supposed to notify this plugin when they are finished with their processing.
 void dispose()
          Releases all the listenres of this plug-in in order to make it eligible for garbage collection.
 java.lang.String getFullContext()
           
 java.lang.String getFullPath()
           
 MOPluginInterface[] getRequiredPluginsList()
           
 org.w3c.dom.Node getSubtree()
           
 boolean hasChildren()
          Determines whether this plug-in requires other plug-ins or not
 void removeListener(MOPluginListenerInterface plugin)
          Removes a plug-in registered as listener of this plug-in
 
Methods inherited from interface edu.uci.isr.yancees.plugin.PluginInterface
getId, getTag
 
Methods inherited from interface edu.uci.isr.yancees.plugin.MOPluginListenerInterface
receivePluginNotification, receivePluginNotification
 

Method Detail

getFullContext

public java.lang.String getFullContext()
Returns:
a string separated by '/' that expresses the context, or sequence of tags from the root of a subscription DOM subtree to the subtree that this plug-in represents. For example, if this plug-in will handle the subtree headed by the tag in a subscripton like: ... ... ... its full context will be 'subscription/rule' because followed-by is inside this path. The context is the path without the tag name. This information will be part of all events produced by this component. This information helps the subscription node to identify the events coming from this component, knowing that that specific branch of his was evaluated and the answer comes in that event.

getFullPath

public java.lang.String getFullPath()
Returns:
a string separated by '/' that expresses the path, or sequence of tags from the root of a subscription DOM subtree to the subtree that this plug-in represents. For example, if this plug-in will handle the subtree headed by the tag in a subscripton like: ... ... ... its full path will be 'subscription/rule/followed-by' This information will be part of all events produced by this component. This information helps the subscription node to identify the events coming from this component, knowing that that specific branch of his was evaluated and the answer comes in that event.

getSubtree

public org.w3c.dom.Node getSubtree()
Returns:
the DOM subtree that is handled (and headed) by this plug-in

addListener

public void addListener(MOPluginListenerInterface plugin)
Makes this plug-in notify another provided plugin whenever it computers its output The output here is data (events) obtained as a result of a subscription


removeListener

public void removeListener(MOPluginListenerInterface plugin)
Removes a plug-in registered as listener of this plug-in


addRequiredPlugin

public void addRequiredPlugin(MOPluginInterface plugin)
This method is used by the subscription parser to inform the plugin of all the IDs of the plug-ins that are supposed to notify this plugin when they are finished with their processing. This method is invoked in the BFS order in which the tags each plugin processes are parsed in the DOM tree. This information is necessary for plug-ins as the sequence detection in which the order of notifications may be important.


getRequiredPluginsList

public MOPluginInterface[] getRequiredPluginsList()
Returns:
a list of PluginsInterface instances that this plug-in requires.

hasChildren

public boolean hasChildren()
Determines whether this plug-in requires other plug-ins or not

Returns:
true if this plug-in requires other plug-ins or false if not

dispose

public void dispose()
Releases all the listenres of this plug-in in order to make it eligible for garbage collection.