agents
Class AgentFormat
java.lang.Object
agents.AgentFormat
- All Implemented Interfaces:
- java.lang.Runnable
- Direct Known Subclasses:
- FilterAgent, GoogleAgent, HTMLFetcherAgent, KnowledgeGatherAgent, PrologAgent, SearchApprovalAgent
public abstract class AgentFormat
- extends java.lang.Object
- implements java.lang.Runnable
This class should be extended by all agents.
This class implements runnable, so all classes that extends this class must declare a run() method
This class contains two Vectors; input and output.
input and output are Vectors of Vectors of DataPackage.
This means that each class that extend this class can have an undefined number of variables containing an undefined number of elements,
in both its input variable and in its output variable
- Author:
- Håvard Rykkelid
Method Summary |
void |
init(java.util.Vector<java.util.Vector<DataPackage>> input,
java.util.Vector<java.util.Vector<DataPackage>> output)
This method is called by the Conveyor class to declare which Vectors this instance of the class should refer to in its input and output |
protected void |
outputAll(DataPackage value)
This method will send a reference to the DataPackage it receives to all the outputs of this agent. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.lang.Runnable |
run |
input
protected java.util.Vector<java.util.Vector<DataPackage>> input
output
protected java.util.Vector<java.util.Vector<DataPackage>> output
AgentFormat
public AgentFormat()
init
public void init(java.util.Vector<java.util.Vector<DataPackage>> input,
java.util.Vector<java.util.Vector<DataPackage>> output)
- This method is called by the Conveyor class to declare which Vectors this instance of the class should refer to in its input and output
- Parameters:
input
- - a Vector containing the Vectors of the input-variablesoutput
- - a Vector containing the Vectors of the output-variables
outputAll
protected void outputAll(DataPackage value)
- This method will send a reference to the DataPackage it receives to all the outputs of this agent.
(Reference, not a copy)
- Parameters:
value
- - the DataPackage that should be sent to all outputs.