|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnesstar.api.Executor
public class Executor
A manager for the execution of an URL.
The URL can be:
ExecutorLogto track the execution and the final result of the operation
HTMLViewerto which the Executor forwards for display:
Notes:
@bug threads are not reused.
@bug won't handle properly HTML form calls (login, etc.)
@todo redesign completly, together
with ExecutorLog. remove unnecessary functionality from public interface
| Field Summary | |
|---|---|
static int |
NO_TIMEOUT
indicates that the Executor should not try to enforce a timeout on the method execution. |
static String |
OLD_EXPLORER_ID
The proxy URL of the first version of the Nesstar Explorer |
| Constructor Summary | |
|---|---|
Executor(URL url,
ExecutorLog log)
Constructor for the Executor object |
|
Executor(URL url,
ExecutorLog log,
HTMLViewer viewer)
Constructor for the Executor object |
|
Executor(URL url,
ExecutorLog log,
int timeout)
Constructor for the Executor object |
|
Executor(URL url,
ExecutorLog log,
int timeout,
HTMLViewer viewer)
Constructor for the Executor object |
|
Executor(URL url,
ExecutorLog log,
int timeout,
HTMLViewer viewer,
boolean wantResult)
|
|
| Method Summary | |
|---|---|
void |
cancel()
Cancel execution of current command |
void |
execute()
Execute the operation managed by this Executor. |
static Exception |
getAPIException(Exception e)
|
String |
getHeader(String name)
Gets the header attribute of the Executor object |
Vector |
getHeaders()
Gets the headers attribute of the Executor object |
URL |
getOnAccessCancelled()
Gets the onAccessRefused attribute of the Executor object |
URL |
getOnAccessChallenged()
|
URL |
getOnAccessGranted()
Gets the onAccessGranted attribute of the Executor object |
URL |
getOnAccessRefused()
Gets the onAccessRefused attribute of the Executor object |
URL |
getOpURL()
|
void |
run()
Main processing method for the Executor object |
static void |
setDefaultOnAccessGranted(URL defaultOnAccessGranted)
Sets the defaultOnAccessGranted attribute of the Executor class |
static void |
setDefaultOnAccessRefused(URL defaultOnAccessRefused)
Sets the defaultOnAccessRefused attribute of the Executor class |
void |
setHeader(String name,
String value)
Sets the header attribute of the Executor object |
void |
setOnAccessCancelled(URL onAccessCancelled)
Sets the onAccessCancelled attribute of the Executor object |
void |
setOnAccessChallenged(URL accessChallenged)
|
void |
setOnAccessGranted(URL onAccessGranted)
Sets the onAccessGranted attribute of the Executor object |
void |
setOnAccessRefused(URL onAccessRefused)
Sets the onAccessRefused attribute of the Executor object |
void |
setReexecute(boolean reexecute)
Sets the reexecute attribute of the Executor object |
void |
setWantsRawResult(boolean wantsRawResult)
Sets the wantsRawResult attribute of the Executor object |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static int NO_TIMEOUT
public static String OLD_EXPLORER_ID
| Constructor Detail |
|---|
public Executor(URL url,
ExecutorLog log,
int timeout,
HTMLViewer viewer,
boolean wantResult)
url - the url to executelog - the log to which messages and exceptions have to be forwardedtimeout - in secsviewer - the internal viewer to use to show non Nesstar URLs and challengeswantResult - if true the executor won't use the viewer and will return to the ExecutorLog the contents of non-nesstar URLs
public Executor(URL url,
ExecutorLog log,
int timeout,
HTMLViewer viewer)
url - the url to executelog - the log to which messages and exceptions have to be forwardedtimeout - in secsviewer - the internal viewer to use to show non Nesstar URLs and challenges
public Executor(URL url,
ExecutorLog log,
int timeout)
url - log - timeout -
public Executor(URL url,
ExecutorLog log,
HTMLViewer viewer)
url - log - viewer -
public Executor(URL url,
ExecutorLog log)
url - log - | Method Detail |
|---|
public void setWantsRawResult(boolean wantsRawResult)
wantsRawResult - The new wantsRawResult value
public void setHeader(String name,
String value)
name - The new header valuevalue - The new header valuepublic void setReexecute(boolean reexecute)
reexecute - The new reexecute valuepublic void setOnAccessGranted(URL onAccessGranted)
onAccessGranted - The new onAccessGranted valuepublic void setOnAccessCancelled(URL onAccessCancelled)
onAccessCancelled - The new onAccessCancelled valuepublic URL getOnAccessChallenged()
public void setOnAccessChallenged(URL accessChallenged)
accessChallenged - The _onAccessChallenged to set.public static void setDefaultOnAccessGranted(URL defaultOnAccessGranted)
defaultOnAccessGranted - The new defaultOnAccessGranted valuepublic void setOnAccessRefused(URL onAccessRefused)
onAccessRefused - The new onAccessRefused valuepublic static void setDefaultOnAccessRefused(URL defaultOnAccessRefused)
defaultOnAccessRefused - The new defaultOnAccessRefused valuepublic String getHeader(String name)
name -
public Vector getHeaders()
public URL getOnAccessGranted()
public URL getOnAccessRefused()
public URL getOnAccessCancelled()
public URL getOpURL()
public void execute()
public static Exception getAPIException(Exception e)
e - the exception returned by MIMEObject
public void run()
run in interface Runnablepublic void cancel()
| this call is ignored |
|
Nesstar SDK | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||