nesstar.api
Class BasicExecutorLog

java.lang.Object
  extended by nesstar.api.BasicExecutorLog
All Implemented Interfaces:
ExecutorLog

public class BasicExecutorLog
extends Object
implements ExecutorLog

A simple implementation of ExecutorLog.

Created:
26 April 2002

Constructor Summary
BasicExecutorLog(Bookmark bookmark, int timeout, boolean wantResult)
          Constructor for the BasicExecutorLog object
BasicExecutorLog(Bookmark bookmark, int timeout, HTMLViewer viewer, boolean wantResult)
          Control the execution of the given bookmark
 
Method Summary
 void allDone()
           
 MIMEObject blockingExecute()
          Blocking call, execute the bookmark and return when done or when timeout occurs
 void cancelled()
          Method
static void dbg(String msg)
           
 void done()
          Method
 void done(MIMEObject result)
          Method
 void elapsed(long millisecs)
          Method
 void err(Exception e)
          Method
 void execute()
          Non blocking execute
 MIMEObject executeIt()
          Execute the bookmark returning either the final result or an error.
 Bookmark getBookmark()
           
static String getDefaultExecutorLog()
           
static ExecutorLog getDefaultExecutorLogInstance()
           
 Exception getError()
          Gets the error attribute of the BasicExecutorLog object
 Executor getExecutor()
          Gets the executor attribute of the BasicExecutorLog object
 MIMEObject getResult()
          Gets the result attribute of the BasicExecutorLog object
 long getTime()
          Gets the time attribute of the BasicExecutorLog object
 boolean isDone()
          Gets the done attribute of the BasicExecutorLog object
static void parallelExecution(Vector executors, int checkInterval)
          Execute in parallel a set of executors
 void setBookmark(Bookmark bookmark)
           
static void setDefaultExecutorLog(String executor)
           
 void setResult(MIMEObject result)
          sets the result attribute of the BasicExecutorLog object
 String toString()
          Method
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicExecutorLog

public BasicExecutorLog(Bookmark bookmark,
                        int timeout,
                        HTMLViewer viewer,
                        boolean wantResult)
                 throws Exception
Control the execution of the given bookmark

Parameters:
timeout - timeout in secs
bookmark -
viewer -
wantResult -
Throws:
Exception

BasicExecutorLog

public BasicExecutorLog(Bookmark bookmark,
                        int timeout,
                        boolean wantResult)
                 throws Exception
Constructor for the BasicExecutorLog object

Parameters:
bookmark -
timeout -
wantResult -
Throws:
Exception
Method Detail

setBookmark

public void setBookmark(Bookmark bookmark)

getBookmark

public Bookmark getBookmark()

isDone

public boolean isDone()
Gets the done attribute of the BasicExecutorLog object

Returns:
The done value

getTime

public long getTime()
Gets the time attribute of the BasicExecutorLog object

Returns:
The time value

getError

public Exception getError()
Gets the error attribute of the BasicExecutorLog object

Returns:
The error value

getResult

public MIMEObject getResult()
Gets the result attribute of the BasicExecutorLog object

Returns:
The result value

setResult

public void setResult(MIMEObject result)
sets the result attribute of the BasicExecutorLog object


getExecutor

public Executor getExecutor()
Gets the executor attribute of the BasicExecutorLog object

Returns:
The executor value

allDone

public void allDone()

dbg

public static void dbg(String msg)

executeIt

public MIMEObject executeIt()
                     throws Exception
Execute the bookmark returning either the final result or an error.

Throws:
Exception

blockingExecute

public MIMEObject blockingExecute()
                           throws Exception
Blocking call, execute the bookmark and return when done or when timeout occurs

Returns:
Throws:
Exception

execute

public void execute()
Non blocking execute


elapsed

public void elapsed(long millisecs)
Method

Specified by:
elapsed in interface ExecutorLog
Parameters:
millisecs -

err

public void err(Exception e)
Method

Specified by:
err in interface ExecutorLog
Parameters:
e -

done

public void done(MIMEObject result)
Method

Specified by:
done in interface ExecutorLog
Parameters:
result -

done

public void done()
Method

Specified by:
done in interface ExecutorLog

cancelled

public void cancelled()
Method

Specified by:
cancelled in interface ExecutorLog

toString

public String toString()
Method

Overrides:
toString in class Object
Returns:

parallelExecution

public static void parallelExecution(Vector executors,
                                     int checkInterval)
Execute in parallel a set of executors

Parameters:
executors - a vector of executors to be executed
checkInterval - the interval in secs between checks for completition

setDefaultExecutorLog

public static void setDefaultExecutorLog(String executor)

getDefaultExecutorLog

public static String getDefaultExecutorLog()

getDefaultExecutorLogInstance

public static ExecutorLog getDefaultExecutorLogInstance()

Nesstar SDK

Copyright©2003 NSD - All Rights Reserved