|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.larkc.plugin.Plugin
public abstract class Plugin
Plugin class. It have implemented the URI and identifier methods. All the plug-ins have to extend this. All the plug-ins should be instantiated using constructor with URI parameter, or using PluginRegistry. Otherwise getIdentifier will be null. The work of the plug-in is done by the invokeInternal() method. This class also provides caching functionality. The default behavior is to use caching based on the entire input. If only parts of the input need to be taken into consideration, the getKey() method should be overridden. If caching is to be disabled, the cacheInsert() and cacheLookup() methods are to be overridden.
Constructor Summary | |
---|---|
Plugin(org.openrdf.model.URI _pluginName)
Constructs and gives the name to the plug-in. |
Method Summary | |
---|---|
void |
createPubSubConnection()
Creates the connection to the broker. |
java.lang.String |
getBrokerUrl()
Returns the URL of the broker. |
org.openrdf.model.URI |
getIdentifier()
Returns the URI of the plug-in. |
int |
getMergeBehavior()
Getter. |
SetOfStatements |
getPluginParameters()
Getter. |
java.lang.String[] |
getTopics()
Returns the topics that the plugin is subscribed to. |
void |
initialise(SetOfStatements workflowDescription,
java.lang.String brokerUrl,
java.lang.String[] topics)
Called by the platform so that the plug-in can do any extra one-time initialisation after construction, but before invocation. |
SetOfStatements |
invoke(SetOfStatements input)
Called by the plug-in manager. |
abstract void |
onMessage(javax.jms.Message message)
Called by the Plugin if it subscribed to some topic and received some messages. |
void |
setBrokerUrl(java.lang.String brokerUrl)
Sets the URL of the broker. |
void |
setMergeBehavior(int mergeBehavior)
Setter. |
void |
setTopics(java.lang.String[] topics)
Sets the topics that this plugin subscribes or publishes to. |
void |
shutdown()
Called by the plug-in manager. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Plugin(org.openrdf.model.URI _pluginName)
_pluginName
- Method Detail |
---|
public int getMergeBehavior()
public void setMergeBehavior(int mergeBehavior)
mergeBehavior
- the mergeBehavior to setpublic final void initialise(SetOfStatements workflowDescription, java.lang.String brokerUrl, java.lang.String[] topics)
workflowDescription
- The workflow descriptionbrokerUrl
- the URL of the message brokertopics
- topics of the message brokerpublic void setBrokerUrl(java.lang.String brokerUrl)
brokerUrl
- The URL of the broker.public java.lang.String getBrokerUrl()
public void setTopics(java.lang.String[] topics)
topics
- public java.lang.String[] getTopics()
public void createPubSubConnection() throws javax.jms.JMSException
javax.jms.JMSException
public abstract void onMessage(javax.jms.Message message)
onMessage
in interface javax.jms.MessageListener
message
- The message receivedpublic void shutdown()
public org.openrdf.model.URI getIdentifier()
public final SetOfStatements invoke(SetOfStatements input)
input
-
public SetOfStatements getPluginParameters()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |