org.elite.jdcbot.util
Class GoogleCalculation

java.lang.Object
  extended by org.elite.jdcbot.util.WebPageFetcher
      extended by org.elite.jdcbot.util.GoogleCalculation
All Implemented Interfaces:
java.lang.Runnable

public class GoogleCalculation
extends WebPageFetcher
implements java.lang.Runnable

This class extends WebPageFetcher class and implements Runnable It gets calculation string (e.g. 1+2*3) and returns result using google and WebPageFetcher Reason for implementing Runnable is that it can gets stuck while WebPageFetcher finishes its work Credits for idea goes to http://sourceforge.net/projects/phpdcbot !!!

Since:
0.6
Version:
0.6
Author:
Milos Grbic, Kokanovic Branko

Field Summary
private  jDCBot _bot
           
 
Constructor Summary
GoogleCalculation(jDCBot bot, java.lang.String calc)
           
 
Method Summary
private  java.lang.String GetCalculation()
           
 void run()
           
 
Methods inherited from class org.elite.jdcbot.util.WebPageFetcher
getPageContent, getPageHeader, SetURL, SetURL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_bot

private jDCBot _bot
Constructor Detail

GoogleCalculation

public GoogleCalculation(jDCBot bot,
                         java.lang.String calc)
                  throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

GetCalculation

private java.lang.String GetCalculation()
                                 throws java.lang.Exception
Throws:
java.lang.Exception

run

public void run()
Specified by:
run in interface java.lang.Runnable