|
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mozilla.javascript.ContextFactory
com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory
public class HtmlUnitContextFactory
ContextFactory that supports termination of scripts if they exceed a timeout. Based on example from ContextFactory.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.mozilla.javascript.ContextFactory |
---|
org.mozilla.javascript.ContextFactory.Listener |
Constructor Summary | |
---|---|
HtmlUnitContextFactory(org.apache.commons.logging.Log log)
Create a new instance of HtmlUnitContextFactory |
Method Summary | |
---|---|
static boolean |
getDebuggerEnabled()
Returns true if the debugger is enabled, false otherwise. |
static long |
getTimeout()
Returns the number of milliseconds a script is allowed to execute before being terminated. |
static void |
setDebuggerEnabled(boolean enabled)
Enables or disables the debugger, which logs stack entries and exceptions. |
static void |
setTimeout(long timeout)
Set the number of milliseconds a script is allowed to execute before being terminated. |
Methods inherited from class org.mozilla.javascript.ContextFactory |
---|
addListener, call, enter, enterContext, enterContext, exit, getApplicationClassLoader, getGlobal, hasExplicitGlobal, initApplicationClassLoader, initGlobal, isSealed, removeListener, seal |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HtmlUnitContextFactory(org.apache.commons.logging.Log log)
log
- the log that the error reporter should useMethod Detail |
---|
public static boolean getDebuggerEnabled()
DebuggerImpl
,
DebugFrameImpl
public static long getTimeout()
public static void setDebuggerEnabled(boolean enabled)
enabled
- whether or not the debugger should be enabledDebuggerImpl
,
DebugFrameImpl
public static void setTimeout(long timeout)
timeout
- the timeout value
|
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |