added final constants, so that other class can reach it;

cleaned;

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@741 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
borg-0300 20 years ago
parent 900ab97422
commit 42cd2cea65

@ -3,7 +3,10 @@
// (C) by Michael Peter Christen; mc@anomic.de // (C) by Michael Peter Christen; mc@anomic.de
// first published on http://www.anomic.de // first published on http://www.anomic.de
// Frankfurt, Germany, 2004 // Frankfurt, Germany, 2004
// last major change: 04.02.2004 //
// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
// //
// This program is free software; you can redistribute it and/or modify // This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by // it under the terms of the GNU General Public License as published by
@ -48,10 +51,16 @@ package de.anomic.server;
import java.net.InetAddress; import java.net.InetAddress;
import java.util.Iterator; import java.util.Iterator;
import de.anomic.server.logging.serverLog; import de.anomic.server.logging.serverLog;
public interface serverSwitch { public interface serverSwitch {
public static final String PEERTYPE = "PeerType";
public static final String PEERTYPE_VIRGIN = "virgin";
public static final String PEERTYPE_JUNIOR = "junior";
public static final String PEERTYPE_SENIOR = "senior";
public static final String PEERTYPE_PRINCIPAL = "principal";
// the root path for the application // the root path for the application
public String getRootPath(); public String getRootPath();
@ -62,15 +71,15 @@ public interface serverSwitch {
// a switchboard can have action listener // a switchboard can have action listener
// these listeners are hooks for numerous methods below // these listeners are hooks for numerous methods below
public void deployAction(String actionName, public void deployAction(String actionName,
String actionShortDescription, String actionShortDescription,
String actionLongDescription, String actionLongDescription,
serverSwitchAction action); serverSwitchAction action);
public void undeployAction(String actionName); public void undeployAction(String actionName);
// the switchboard can manage worker threads // the switchboard can manage worker threads
public void deployThread(String threadName, public void deployThread(String threadName,
String threadShortDescription, String threadShortDescription,
String threadLongDescription, String threadLongDescription,
String threadMonitorURL, String threadMonitorURL,
serverThread newThread, serverThread newThread,
long startupDelay, long startupDelay,
@ -83,7 +92,7 @@ public interface serverSwitch {
public void terminateAllThreads(boolean waitFor); public void terminateAllThreads(boolean waitFor);
public Iterator /*of serverThread-Names (String)*/ threadNames(); public Iterator /*of serverThread-Names (String)*/ threadNames();
// the switchboard can be used to set and read properties // the switchboard can be used to set and read properties
public void setConfig(String key, String value); public void setConfig(String key, String value);
public String getConfig(String key, String dflt); public String getConfig(String key, String dflt);
@ -110,8 +119,9 @@ public interface serverSwitch {
// The actionName selects an action // The actionName selects an action
// the actionInput is an input for the selected action // the actionInput is an input for the selected action
public serverObjects action(String actionName, serverObjects actionInput); public serverObjects action(String actionName, serverObjects actionInput);
// performance control: the server can announce busy and idle status to the switchboard // performance control: the server can announce busy and idle status to the switchboard
// these announcements can be used to trigger events or interrupts // these announcements can be used to trigger events or interrupts
public void handleBusyState(int jobs); public void handleBusyState(int jobs);
} }

Loading…
Cancel
Save