org.kaariboga.plugins.helloPlugIn
Class HelloPlugIn

java.lang.Object
  |
  +--org.kaariboga.core.Kaariboga
        |
        +--org.kaariboga.plugin.KbPlugIn
              |
              +--org.kaariboga.plugins.helloPlugIn.HelloPlugIn
All Implemented Interfaces:
KbMessageHandler, java.lang.Runnable, java.io.Serializable

public class HelloPlugIn
extends KbPlugIn
implements java.io.Serializable

An example for the implementation of a plug-in.

See Also:
Serialized Form

Inner classes inherited from class org.kaariboga.core.Kaariboga
Kaariboga.FireEventThread, Kaariboga.FireMessageThread
 
Field Summary
private  HelloService service
          A class that provides a set of methods.
 
Fields inherited from class org.kaariboga.plugin.KbPlugIn
serviceNames
 
Fields inherited from class org.kaariboga.core.Kaariboga
base, destination, kaaribogaListener, messageListener, name
 
Constructor Summary
HelloPlugIn(java.lang.String name)
          Initialize the plug-in with name and a service name.
 
Method Summary
 java.lang.Object getService(java.lang.String name)
          This method returns an object, that can be used by agents or the server itself.
 void setProperties(java.util.Properties properties)
          Set configuration options for this plug-in.
 
Methods inherited from class org.kaariboga.plugin.KbPlugIn
getMessageTypes, getServiceNames
 
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
 

Field Detail

service

private HelloService service
A class that provides a set of methods.
Constructor Detail

HelloPlugIn

public HelloPlugIn(java.lang.String name)
Initialize the plug-in with name and a service name. A service name is an identifier, which can be used by agents to find a specific plug-in. The name is just a unique Id.
Parameters:
name - Unique Id for this instance.
Method Detail

getService

public java.lang.Object getService(java.lang.String name)
This method returns an object, that can be used by agents or the server itself. An agent usually searches for a service name and checks if the object this method returns is of the type it expects.
Overrides:
getService in class KbPlugIn
Returns:
An object, that implements a set of service specific methods.

setProperties

public void setProperties(java.util.Properties properties)
Set configuration options for this plug-in.
Overrides:
setProperties in class KbPlugIn
Parameters:
props - Properties for this plug-in.