edu.uci.isr.yancees.server.plugin
Class AbstractProtocolPlugin
java.lang.Object
edu.uci.isr.yancees.server.plugin.AbstractPlugin
edu.uci.isr.yancees.server.plugin.AbstractProtocolPlugin
- All Implemented Interfaces:
- PluginInterface, PluginListenerInterface, ProtocolPluginInterface
- Direct Known Subclasses:
- MobilityProtocolPlugin, PollProtocolPlugin
- public abstract class AbstractProtocolPlugin
- extends AbstractPlugin
- implements ProtocolPluginInterface
This abstract class defines the basic functionality of the plug-in as well
as its main attributes.
A protocol plug-in handles all the messages of a session. It is created and
terminated by special messages, as opposed to the subscription plug-ins which only
perform queries and provide events when the query is matched. A protocol plug-in
on the onther hand, can perform many functionalities and can have access to many
sub-components and plug-in instances of the system.
Methods inherited from class edu.uci.isr.yancees.server.plugin.AbstractPlugin |
addListener, addRequiredPlugin, dispose, getExpectedPluginIDs, getFullContext, getFullPath, getId, getRequiredPluginsList, getSubtree, getTag, hasChildren, publishOutput, publishOutput, removeListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface edu.uci.isr.yancees.server.plugin.PluginInterface |
addListener, addRequiredPlugin, dispose, getFullContext, getFullPath, getId, getRequiredPluginsList, getSubtree, getTag, hasChildren, removeListener |
AbstractProtocolPlugin
public AbstractProtocolPlugin(org.w3c.dom.Node subTree)
- Parameters:
subTree
- is the DOM tree this plugin is responsible for executing
receivePluginNotification
public abstract void receivePluginNotification(EventInterface evt,
PluginInterface source)
- Receives a notification from another plug-in this plug-in depends on
- Specified by:
receivePluginNotification
in interface PluginListenerInterface
- Specified by:
receivePluginNotification
in class AbstractPlugin
- Parameters:
evt
- is the event receivedsource
- is the plug-in sending the notification.
receivePluginNotification
public abstract void receivePluginNotification(EventInterface[] evtList,
PluginInterface source)
- Receives a list of events as notifications from another plug-in
this plug-in depends on.
- Specified by:
receivePluginNotification
in interface PluginListenerInterface
- Specified by:
receivePluginNotification
in class AbstractPlugin
- Parameters:
evtList
- is the list of events receivedsource
- is the plug-in sending the notification.
terminateSession
public abstract void terminateSession()
- Gracefully terminates the current plugin as a result of the end of the
communicatoin session.
- Specified by:
terminateSession
in interface ProtocolPluginInterface
receiveProtocolMessage
public abstract void receiveProtocolMessage(MessageInterface msg,
SubscriberInterface si)
throws ProtocolPluginException
- Receive messages from this protocol
- Specified by:
receiveProtocolMessage
in interface ProtocolPluginInterface
- Parameters:
msg
- is a message according to the protocol that the plug-in implements.
- Throws:
ProtocolPluginException