kaos.core.csi.usecase
Class SimpleReceiver

java.lang.Object
  extended by kaos.core.csi.usecase.SimpleReceiver

public class SimpleReceiver
extends java.lang.Object

$Revision: 1.5 $


Field Summary
protected  KAoSAgentDescription _agentDescription
          This class illustrates an implementation of a SimpleReceiver: an entity capable of receiving messages.
protected  TransportSupport _transportSupport
           
 
Constructor Summary
SimpleReceiver()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
          Two agents are equal if their respective hash codes are equal.
 int hashCode()
           
 void initialize(java.lang.String name, KAoSAgentDescription agentDescription, java.lang.String transportName)
           
static void main(java.lang.String[] args)
           
 void receiveMessage(TransportMessage tmsg)
          Implements the receiveMessage method mandated by the MessageListener interface.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_agentDescription

protected KAoSAgentDescription _agentDescription
This class illustrates an implementation of a SimpleReceiver: an entity capable of receiving messages. Configuration data includes: nickname, names of kaos domains it will register in, name of a transport to use for communication within KAoS. Bootstrapping steps: - obtains a reference to CSI Registration - binds itself to CSI Transport - asks CSI Registration to register with KAoS using given KAoSAgentDescription Running - waits for messages - acknowledges received messages by sending a reply to sender


_transportSupport

protected TransportSupport _transportSupport
Constructor Detail

SimpleReceiver

public SimpleReceiver()
Method Detail

initialize

public void initialize(java.lang.String name,
                       KAoSAgentDescription agentDescription,
                       java.lang.String transportName)
                throws java.lang.Exception
Throws:
java.lang.Exception

receiveMessage

public void receiveMessage(TransportMessage tmsg)
Implements the receiveMessage method mandated by the MessageListener interface. Sends an acknowledgement back to the receiver.


equals

public boolean equals(java.lang.Object obj)
Two agents are equal if their respective hash codes are equal.

Overrides:
equals in class java.lang.Object
Returns:
true if obj equals this SimpleReceiver.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2005 IHMC All Rights Reserved.