bass.crawler
Class CrawlerClientBackup

java.lang.Object
  extended by bass.crawler.CrawlerClientBackup

public class CrawlerClientBackup
extends java.lang.Object

Backup Server, used to restart a client if it times out. For consistent use also use this class to start first client

Version:
0.1
Author:
Thomas Klein

Field Summary
private static java.lang.Process client
           
private static int listenPort
           
 
Constructor Summary
CrawlerClientBackup()
           
 
Method Summary
private static void closeClient()
          closes the current client
static int getListenPort()
           
static void main(java.lang.String[] args)
          starts a CrawlerClient and opens a socket to wait for restart commands from the CrawlerServer
private static void startNewClient()
          starts a new client
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

client

private static java.lang.Process client

listenPort

private static final int listenPort
See Also:
Constant Field Values
Constructor Detail

CrawlerClientBackup

public CrawlerClientBackup()
Method Detail

main

public static void main(java.lang.String[] args)
starts a CrawlerClient and opens a socket to wait for restart commands from the CrawlerServer

Parameters:
args - not used

startNewClient

private static void startNewClient()
                            throws java.io.IOException
starts a new client

Throws:
java.io.IOException - if the client can't be started

closeClient

private static void closeClient()
closes the current client


getListenPort

public static int getListenPort()
Returns:
the listenPort