examples.distcontrol
Class SearchAgent

java.lang.Object
  extended byde.fhg.igd.semoa.agent.RoundtripAgent
      extended byexamples.distcontrol.SearchAgent
All Implemented Interfaces:
Runnable, Serializable

public class SearchAgent
extends RoundtripAgent

An agents which is intended to wander round and check for critical files on different storages. The search-engine is provided by the DistControlService, which is expected at the visited servers.

Version:
"$Id: SearchAgent.java 1913 2007-08-08 02:41:53Z jpeters $"
Author:
Ulrich Pinsdorf
See Also:
Serialized Form

Field Summary
private  List files_
          An ordered list of critical files the agent has collected yet.
private  FileHandler handler_
          DOCUMENT ME!
private static String LOGFILE
          Defines where the log file is stored in the agent's corpus.
private static int state_
          Represents the state of the agent's lifecycle.
 
Fields inherited from class de.fhg.igd.semoa.agent.RoundtripAgent
debug_, env_, MAX_RETRIES, mob_, start_, time_, vars_
 
Constructor Summary
SearchAgent(FileHandler handler)
          Creates the agent and initializes the member fields properly.
 
Method Summary
private  String currentLocation()
          DOCUMENT ME!
private  String currentURL()
          DOCUMENT ME!
protected  void finish()
          DOCUMENT ME!
 String getLog()
          DOCUMENT ME!
 void log(String message)
          Appends at message line at the end of the log file in the agent's corpus.
protected  void perform()
          DOCUMENT ME!
private  void searchfiles()
          DOCUMENT ME!
 
Methods inherited from class de.fhg.igd.semoa.agent.RoundtripAgent
getHopNumber, onRunning, run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

files_

private List files_
An ordered list of critical files the agent has collected yet.


state_

private static int state_
Represents the state of the agent's lifecycle.


LOGFILE

private static final String LOGFILE
Defines where the log file is stored in the agent's corpus. This is mutable/log.txt

See Also:
Constant Field Values

handler_

private FileHandler handler_
DOCUMENT ME!

Constructor Detail

SearchAgent

public SearchAgent(FileHandler handler)
Creates the agent and initializes the member fields properly.

Parameters:
handler - DOCUMENT ME!
Method Detail

perform

protected void perform()
DOCUMENT ME!

Overrides:
perform in class RoundtripAgent

finish

protected void finish()
DOCUMENT ME!

Overrides:
finish in class RoundtripAgent

searchfiles

private void searchfiles()
DOCUMENT ME!


currentLocation

private String currentLocation()
DOCUMENT ME!

Returns:
DOCUMENT ME!

currentURL

private String currentURL()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getLog

public String getLog()
DOCUMENT ME!

Returns:
DOCUMENT ME!

log

public void log(String message)
Appends at message line at the end of the log file in the agent's corpus. The log file is stored at LOGFILE.

Parameters:
message - DOCUMENT ME!


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.