jadex.service
Class HelloService

java.lang.Object
  extended by jadex.commons.service.BasicService
      extended by jadex.service.HelloService
All Implemented Interfaces:
jadex.commons.IRemotable, jadex.commons.service.IInternalService, jadex.commons.service.IService, IHelloService

public class HelloService
extends jadex.commons.service.BasicService
implements IHelloService

This class implements a Hello service. Every agent on the network is required to send a hello message on this service when it is started. A normal agent is not required to receive any message on this service. A control agent will receive this message (if it is started) and then knows that this agent is available.


Field Summary
protected  jadex.micro.IMicroExternalAccess agent
          The agent.
protected  java.util.List<jadex.commons.IChangeListener> listeners
          The listeners.
 
Fields inherited from class jadex.commons.service.BasicService
idcnt, properties, shutdowned, sid, started, startfutures
 
Fields inherited from interface jadex.commons.service.IService
EMPTY_SERVICES
 
Constructor Summary
HelloService(jadex.bridge.IExternalAccess agent)
          Create a new helpline service.
 
Method Summary
 void addChangeListener(jadex.commons.IChangeListener listener)
          Add a change listener.
 void receive(java.lang.String name, java.lang.String robotName, java.lang.String content)
          Hear something.
 void removeChangeListener(jadex.commons.IChangeListener listener)
          Remove a change listener.
 void send(java.lang.String name, java.lang.String robotName, java.lang.String obj)
          Tell something.
 java.lang.String toString()
          Get the string representation.
 
Methods inherited from class jadex.commons.service.BasicService
createServiceIdentifier, generateServiceName, getPropertyMap, getServiceIdentifier, isValid, setPropertyMap, shutdownService, signalStarted, startService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jadex.commons.service.IService
getPropertyMap, getServiceIdentifier, signalStarted
 

Field Detail

agent

protected jadex.micro.IMicroExternalAccess agent
The agent.


listeners

protected java.util.List<jadex.commons.IChangeListener> listeners
The listeners.

Constructor Detail

HelloService

public HelloService(jadex.bridge.IExternalAccess agent)
Create a new helpline service.

Method Detail

send

public void send(java.lang.String name,
                 java.lang.String robotName,
                 java.lang.String obj)
Tell something.

Parameters:
name - The name.
robotName - The text.
obj -

receive

public void receive(java.lang.String name,
                    java.lang.String robotName,
                    java.lang.String content)
Hear something.

Specified by:
receive in interface IHelloService
Parameters:
name - The name.
robotName - The text.
content - The string content.

addChangeListener

public void addChangeListener(jadex.commons.IChangeListener listener)
Add a change listener.


removeChangeListener

public void removeChangeListener(jadex.commons.IChangeListener listener)
Remove a change listener.


toString

public java.lang.String toString()
Get the string representation.

Overrides:
toString in class java.lang.Object
Returns:
The string representation.