org.kaariboga.plugin
Class KbPlugIn
java.lang.Object
|
+--org.kaariboga.core.Kaariboga
|
+--org.kaariboga.plugin.KbPlugIn
- All Implemented Interfaces:
- KbMessageHandler, java.lang.Runnable, java.io.Serializable
- Direct Known Subclasses:
- DomainPlugIn, HelloPlugIn
- public abstract class KbPlugIn
- extends Kaariboga
- implements java.io.Serializable
A plug-in provides the means to enhance a Kaariboga base.
- See Also:
- Serialized Form
Constructor Summary |
KbPlugIn(java.lang.String name)
|
Method Summary |
java.lang.String[] |
getMessageTypes()
Get the message types, this plug-in can handle.
|
abstract java.lang.Object |
getService(java.lang.String name)
Each plug-in must provide an object, that implements the
methods the plug in provides for external classes like agents. |
java.lang.String[] |
getServiceNames()
Returns the names of the services this plug-in provides. |
abstract void |
setProperties(java.util.Properties properties)
Set configuration options for this plug-in. |
Methods inherited from class org.kaariboga.core.Kaariboga |
addKaaribogaListener, addKaaribogaMessageListener, fireDestroyRequest, fireDispatchRequest, fireKaaribogaMessage, fireSleepRequest, getDestination, getName, handleMessage, onArrival, onAwake, onCreate, onDestroy, onDispatch, onSleep, run, setBase, toString |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
serviceNames
protected java.lang.String[] serviceNames
KbPlugIn
public KbPlugIn(java.lang.String name)
- Parameters:
name
- Unique Id for this plug-in
getServiceNames
public java.lang.String[] getServiceNames()
- Returns the names of the services this plug-in provides.
getService
public abstract java.lang.Object getService(java.lang.String name)
- Each plug-in must provide an object, that implements the
methods the plug in provides for external classes like agents.
- Parameters:
name
- Name of the requested service- Returns:
- An object, that can be used to call the methods this plug-in provides
getMessageTypes
public java.lang.String[] getMessageTypes()
- Get the message types, this plug-in can handle.
The messages may be registered at a KaaribogaBase.
The base will delegate appropriate messages to the
right plug-in.
- Returns:
- An array with the names of the messages
setProperties
public abstract void setProperties(java.util.Properties properties)
- Set configuration options for this plug-in.
- Parameters:
props
- Properties for this plug-in.