edu.uwf.kaos.coabsgrid.test.kgh
Class WeatherAgentContentTest

java.lang.Object
  extended by edu.uwf.kaos.coabsgrid.test.kgh.WeatherAgentContentTest
All Implemented Interfaces:
java.io.Serializable

public class WeatherAgentContentTest
extends java.lang.Object
implements java.io.Serializable

$Revision: 1.1 $

See Also:
Serialized Form

Field Summary
protected  java.lang.String name
           
protected  KAoSAgentRegistrationHelper reg
           
 
Constructor Summary
WeatherAgentContentTest(java.lang.String name)
          Uses default LegacyWeatherAgentContentTest.
WeatherAgentContentTest(java.lang.String name, LegacyWeatherService ws)
          Demonstrates wrapping a legacy system.
 
Method Summary
 AgentRep getAgentRep()
          Used by the SerializeWeatherAgentContentTest and TravelingWeatherAgentContentTest classes.
static void main(java.lang.String[] args)
          Main program.
 void messageAdded(Message msg)
          Implements MessageListener.
 void reexport()
          Used by the SerializeWeatherAgentContentTest and TravelingWeatherAgentContentTest classes.
protected  void respondToWeatherQuery(Message msg)
          Composes a reply message which inclues a weather forecast.
 void sendWeatherQueries(AgentRep rep)
          Sends a weather query to an AgentRep.
 void unexport()
          Used by the SerializeWeatherAgentContentTest and TravelingWeatherAgentContentTest classes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name

reg

protected KAoSAgentRegistrationHelper reg
Constructor Detail

WeatherAgentContentTest

public WeatherAgentContentTest(java.lang.String name,
                               LegacyWeatherService ws)
                        throws java.io.IOException,
                               java.lang.ClassNotFoundException
Demonstrates wrapping a legacy system.

Throws:
java.io.IOException
java.lang.ClassNotFoundException

WeatherAgentContentTest

public WeatherAgentContentTest(java.lang.String name)
                        throws java.io.IOException,
                               java.lang.ClassNotFoundException
Uses default LegacyWeatherAgentContentTest.

Throws:
java.io.IOException
java.lang.ClassNotFoundException
Method Detail

sendWeatherQueries

public void sendWeatherQueries(AgentRep rep)
Sends a weather query to an AgentRep.


messageAdded

public void messageAdded(Message msg)
Implements MessageListener. Processes incoming messages. Assumes that the incoming message has the Sender field filled in with the sender's DefaultAgentRep - otherwise does not bother to reply.


respondToWeatherQuery

protected void respondToWeatherQuery(Message msg)
Composes a reply message which inclues a weather forecast.


unexport

public void unexport()
Used by the SerializeWeatherAgentContentTest and TravelingWeatherAgentContentTest classes.


reexport

public void reexport()
              throws java.io.IOException
Used by the SerializeWeatherAgentContentTest and TravelingWeatherAgentContentTest classes.

Throws:
java.io.IOException

getAgentRep

public AgentRep getAgentRep()
Used by the SerializeWeatherAgentContentTest and TravelingWeatherAgentContentTest classes.


main

public static void main(java.lang.String[] args)
                 throws java.io.IOException,
                        java.lang.ClassNotFoundException
Main program. Instantiates a WeatherAgentContentTest.

Throws:
java.io.IOException
java.lang.ClassNotFoundException